<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>Dinic: Fichero Fuente apifiles/API.c</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Dinic
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">Documentacion de la API de DINIC para la catedra de Matemática Discreta II.</div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Buscar" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generado por Doxygen 1.8.8 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Buscar');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('API_8c_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Todo</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Estructuras de Datos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Archivos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Funciones</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>&apos;typedefs&apos;</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>&apos;defines&apos;</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">API.c</div>  </div>
</div><!--header-->
<div class="contents">
<a href="API_8c.html">Ir a la documentación de este archivo.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#include &lt;stdbool.h&gt;</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#include &lt;stdio.h&gt;</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor">#include &lt;stdlib.h&gt;</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &lt;assert.h&gt;</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="____uthash_8h.html">__uthash.h</a>&quot;</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="__stack_8h.html">_stack.h</a>&quot;</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="__queue_8h.html">_queue.h</a>&quot;</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="____bstrlib_8h.html">__bstrlib.h</a>&quot;</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="__lexer_8h.html">_lexer.h</a>&quot;</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="nbrhd_8h.html">nbrhd.h</a>&quot;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="API_8h.html">API.h</a>&quot;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="parser__lado_8h.html">parser_lado.h</a>&quot;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div>
<div class="line"><a name="l00015"></a><span class="lineno"><a class="line" href="API_8c.html#a944eff1e60dc7aa1a80a3d74581d59c8">   15</a></span>&#160;<span class="preprocessor">#define LVL_NIL -1      </span></div>
<div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="API_8c.html#ac103b05e521b20c12abb4320deccaa25">   16</a></span>&#160;<span class="preprocessor">#define DIR_NIL -1      </span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor"></span><span class="comment">/* Macro: Flags de permisos y estados.*/</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="API_8c.html#ac378f92787011df9178de5ddbfd431e9">   19</a></span>&#160;<span class="preprocessor">#define SINK_REACHED    0b00010000      </span></div>
<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="API_8c.html#a84e808ec7691e6cce6b82b12fc4fd8ce">   20</a></span>&#160;<span class="preprocessor">#define MAXFLOW         0b00001000      </span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#define SOURCE          0b00000100      </span></div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="API_8c.html#a88cabaa30cba6807a1c75eaa7e4c188e">   23</a></span>&#160;<span class="preprocessor">#define SINK            0b00000010      </span></div>
<div class="line"><a name="l00024"></a><span class="lineno"><a class="line" href="API_8c.html#adb1aacb84dbc34f3a142a9d7bc80f375">   24</a></span>&#160;<span class="preprocessor">#define PATHUSED        0b00000001      </span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor"></span><span class="comment">/* Macro: Manejo de flags.*/</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#define SET_FLAG(f) dova-&gt;flags |= f    </span></div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="API_8c.html#a83b5b7cc41c6290c3c2ae4824ac66cb7">   28</a></span>&#160;<span class="preprocessor">#define UNSET_FLAG(f) dova-&gt;flags &amp;= ~f </span></div>
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="API_8c.html#a9db4153fec89607db0b7bb7fe9cda7d1">   29</a></span>&#160;<span class="preprocessor">#define CLEAR_FLAG() 0b00000001         </span></div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="API_8c.html#a061350ba02f3d7830497f165cf345512">   30</a></span>&#160;<span class="preprocessor">#define IS_SET_FLAG(f) (dova-&gt;flags &amp; f) &gt; 0 </span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor"></span><span class="comment">/* Macro: Iterador sobre un path.*/</span><span class="preprocessor"></span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#define PATH_ITER(path, x, y)                                               \</span></div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="API_8c.html#a73ce2e5e598ed903df3611b1da1a653d">   36</a></span>&#160;<span class="preprocessor">    stack_resetViewer(path);                                               \</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">    y = stack_nextItem(path);                                               \</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">    x = stack_nextItem(path);                                               \</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">    for(; (x)!=NULL; (y)=(x), (x)=stack_nextItem(path))</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="comment">/* Estructuras */</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>NetworkSt{</div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="structNetwork.html">   50</a></span>&#160;    <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> name;                   </div>
<div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="structNetwork.html#ad1d9cbcfd37b9b413e8d8d67a719d165">   51</a></span>&#160;    <a class="code" href="structNbrhd.html">Nbrhd</a> nbrs;                 </div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">   52</a></span>&#160;    <span class="keywordtype">int</span> lvl;                    </div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="structNetwork.html#a6c7f440bf2fb555abdc789a41c6acf44">   53</a></span>&#160;    <span class="keywordtype">short</span> <span class="keywordtype">int</span> pDir;             </div>
<div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="structNetwork.html#aa951a7b2858ea82e9e873cb8b9b6a055">   54</a></span>&#160;    <a class="code" href="structUT__hash__handle.html">UT_hash_handle</a> hhNet,hhCut; </div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="structNetwork.html#ae7b1690ddd7f2fa9f4d567b20df26d2b">   55</a></span>&#160;} <a class="code" href="structNetwork.html">Network</a>;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="keyword">struct </span><a class="code" href="structDovahkiinSt.html">DovahkiinSt</a>{</div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="structDovahkiinSt.html">   66</a></span>&#160;    <a class="code" href="structNetwork.html">Network</a> *<a class="code" href="structDovahkiinSt.html#a4b31117247caf337e6cc13c59022d582">net</a>;   </div>
<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="structDovahkiinSt.html#a4b31117247caf337e6cc13c59022d582">   67</a></span>&#160;    <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> <a class="code" href="structDovahkiinSt.html#a94d792c1c34d1a54b1332660f9722c9b">flow</a>;       </div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="structDovahkiinSt.html#a94d792c1c34d1a54b1332660f9722c9b">   68</a></span>&#160;    <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> <a class="code" href="structDovahkiinSt.html#a6e01e80628c38e9f851887a1a6f84129">src</a>;        </div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="structDovahkiinSt.html#a6e01e80628c38e9f851887a1a6f84129">   69</a></span>&#160;    <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> <a class="code" href="structDovahkiinSt.html#a580f8a8c4ebfa45c9301356ee21896de">snk</a>;        </div>
<div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="structDovahkiinSt.html#a580f8a8c4ebfa45c9301356ee21896de">   70</a></span>&#160;    <a class="code" href="structNetwork.html">Network</a> *<a class="code" href="structDovahkiinSt.html#aa808216233d652893e7191b30384b160">cut</a>;   </div>
<div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="structDovahkiinSt.html#aa808216233d652893e7191b30384b160">   71</a></span>&#160;    <a class="code" href="structStack.html">Stack</a> <a class="code" href="structDovahkiinSt.html#ae85ca2a2c403330c0a44a6f704681e6d">path</a>;     </div>
<div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="structDovahkiinSt.html#ae85ca2a2c403330c0a44a6f704681e6d">   72</a></span>&#160;    <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> <a class="code" href="structDovahkiinSt.html#a187ad7ab0fd9b6a049bd07208f873061">pCounter</a>;   </div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="structDovahkiinSt.html#a187ad7ab0fd9b6a049bd07208f873061">   73</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="structDovahkiinSt.html#ac8bf36fe0577cba66bccda3a6f7e80a4">flags</a>;      </div>
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="structDovahkiinSt.html#ac8bf36fe0577cba66bccda3a6f7e80a4">   74</a></span>&#160;};</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="comment">/* Funciones estáticas */</span></div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;<span class="keyword">static</span> <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> <a class="code" href="API_8c.html#a493f4aff33fcec0bda5b03c499de4921">get_pathFlow</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova);</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;<span class="keyword">static</span> <a class="code" href="structNetwork.html">Network</a> *<a class="code" href="API_8c.html#a70536e45ffcb80d6c558b8452c849990">network_create</a>(<a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> n);</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="API_8c.html#a297e3676e6f1a95aa659bad307e143b0">network_destroy</a>(<a class="code" href="structNetwork.html">Network</a> *net);</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;<span class="keyword">static</span> <a class="code" href="structNetwork.html">Network</a> *<a class="code" href="API_8c.html#a90aefbc8ffa273f827dc6122b7e85466">network_nextNode</a>(<a class="code" href="structNetwork.html">Network</a> * net, <a class="code" href="structNetwork.html">Network</a> *x, <span class="keywordtype">short</span> <span class="keywordtype">int</span> *dir);</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="API_8c.html#a9026c1ef7ab01411b3c7b03c56a06fee">set_lvlNbrs</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova, <a class="code" href="structNetwork.html">Network</a> *x, <a class="code" href="structQueue.html">Queue</a> q);</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<a class="code" href="structDovahkiinP.html">DovahkiinP</a> <a class="code" href="API_8c.html#ae1a969d3ef7d23e93db04f15cc6f7588">NuevoDovahkiin</a>(<span class="keywordtype">void</span>){</div>
<div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="API_8h.html#ae1a969d3ef7d23e93db04f15cc6f7588">   88</a></span>&#160;    <a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova;    <span class="comment">/*El dova a crear y devolver*/</span></div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    </div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    <span class="comment">/*Se le asigna memoria*/</span></div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    dova = (<a class="code" href="structDovahkiinP.html">DovahkiinP</a>) malloc (<span class="keyword">sizeof</span>(<span class="keyword">struct</span> <a class="code" href="structDovahkiinSt.html">DovahkiinSt</a>));</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    assert(dova!=NULL);</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    <span class="comment">/*Valores iniciales de un dova vacío*/</span></div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    dova-&gt;net = NULL;</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    dova-&gt;flow = 0;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    dova-&gt;src = 0;</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    dova-&gt;snk = 0;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    dova-&gt;cut = NULL;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    dova-&gt;path = NULL;</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    dova-&gt;flags = <a class="code" href="API_8c.html#a061350ba02f3d7830497f165cf345512">CLEAR_FLAG</a>();</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    dova-&gt;pCounter = 0; </div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="keywordflow">return</span> dova;</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;}</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;<span class="keywordtype">int</span> <a class="code" href="API_8c.html#afc3d0c71276442be2f1c53d5a72dd13e">DestruirDovahkiin</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova){</div>
<div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="API_8h.html#afc3d0c71276442be2f1c53d5a72dd13e">  112</a></span>&#160;    <a class="code" href="structNetwork.html">Network</a> *node = NULL;   <span class="comment">/*El i-esimo nodo en la hash del network*/</span></div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    <a class="code" href="structNetwork.html">Network</a> *ref = NULL;    <span class="comment">/*Lo necesita HASH_ITER para no perder referencias*/</span></div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    assert(dova!=NULL);</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="comment">/*Primero hay que destruir las entradas de la hash del corte.</span></div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;<span class="comment">    Si se destruyen primero los nodos entonces pierdo referencias*/</span></div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="keywordflow">if</span> (dova-&gt;cut != NULL)</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        <a class="code" href="____uthash_8h.html#a0512b3f7a824275579ec82643ef2cc23">HASH_CLEAR</a>(hhCut, dova-&gt;cut);</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;    <span class="comment">/*En este punto ya se puede destruir el network y todos los nodos.</span></div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="comment">    Esto también libera la hash del corte.*/</span></div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;    <span class="keywordflow">if</span> (dova-&gt;net != NULL)</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;        <a class="code" href="____uthash_8h.html#a4d524042f1fcb976d8bccae9e4cc63d6">HASH_ITER</a>(hhNet, dova-&gt;net, node, ref){</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;            <span class="comment">/*Elimina la referencia en la hash del network*/</span></div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;            <a class="code" href="____uthash_8h.html#a3f83117e1108d63844a58d2d79c3b980">HASH_DELETE</a>(hhNet, dova-&gt;net, node);</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;            <a class="code" href="API_8c.html#a297e3676e6f1a95aa659bad307e143b0">network_destroy</a>(node);</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        }</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="comment">/*Se destruye cualquier path almacenado.*/</span></div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <span class="keywordflow">if</span> (dova-&gt;path != NULL)</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        <a class="code" href="__stack_8c.html#ac21780acf29f6bc27fd404a61b0b2fd8">stack_destroy</a>(dova-&gt;path, NULL);</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    free(dova);</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    dova = NULL;</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="keywordflow">return</span> 1;</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;}</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<span class="keywordtype">void</span> <a class="code" href="API_8c.html#a04d15e043d28652a2193455bdc751604">FijarFuente</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova, <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> s){</div>
<div class="line"><a name="l00141"></a><span class="lineno"><a class="line" href="API_8h.html#a0ee67e6694b76b3c1f89125c41390025">  141</a></span>&#160;    assert(dova != NULL);</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    dova-&gt;src = s;</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    <a class="code" href="API_8c.html#a83b5b7cc41c6290c3c2ae4824ac66cb7">SET_FLAG</a>(<a class="code" href="API_8c.html#a88cabaa30cba6807a1c75eaa7e4c188e">SOURCE</a>);</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;}</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;<span class="keywordtype">void</span> <a class="code" href="API_8c.html#a16260bb6534d66a4e14ddd6b68ea151d">FijarResumidero</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova, <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> t){</div>
<div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="API_8h.html#a056f7428ae311f4d411f7d603f18aafe">  152</a></span>&#160;    assert(dova != NULL);</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    dova-&gt;snk = t;</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    <a class="code" href="API_8c.html#a83b5b7cc41c6290c3c2ae4824ac66cb7">SET_FLAG</a>(<a class="code" href="API_8c.html#adb1aacb84dbc34f3a142a9d7bc80f375">SINK</a>);</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;}</div>
<div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;<span class="keywordtype">int</span> <a class="code" href="API_8c.html#a24a677d77df565a3976f7ea6373a9c9d">ImprimirFuente</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova){</div>
<div class="line"><a name="l00168"></a><span class="lineno"><a class="line" href="API_8h.html#a24a677d77df565a3976f7ea6373a9c9d">  168</a></span>&#160;    <span class="keywordtype">int</span> result = -1;    <span class="comment">/*Resultado de la operación.*/</span></div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    </div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    assert(dova != NULL);</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="comment">/*Imprimo solo si la fuente fue fijada*/</span></div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a>(<a class="code" href="API_8c.html#a88cabaa30cba6807a1c75eaa7e4c188e">SOURCE</a>)){</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;        printf(<span class="stringliteral">&quot;Fuente: %&quot;</span>PRIu64<span class="stringliteral">&quot;\n&quot;</span>, dova-&gt;src);</div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;        result=0;</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;    }</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    <span class="keywordflow">return</span> result;</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;}</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;<span class="keywordtype">int</span> <a class="code" href="API_8c.html#adbe7e36132e377beee414598e0544124">ImprimirResumidero</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova){</div>
<div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="API_8h.html#adbe7e36132e377beee414598e0544124">  190</a></span>&#160;    <span class="keywordtype">int</span> result = -1;    <span class="comment">/*Resultado de la operación.*/</span></div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    </div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    assert(dova != NULL);</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    <span class="comment">/*Imprimo solo si el resumidero fue fijado*/</span></div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a>(<a class="code" href="API_8c.html#adb1aacb84dbc34f3a142a9d7bc80f375">SINK</a>)){</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;        printf(<span class="stringliteral">&quot;Resumidero: %&quot;</span>PRIu64<span class="stringliteral">&quot;\n&quot;</span>, dova-&gt;snk);</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        result=0;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    }</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    <span class="keywordflow">return</span> result;</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;}</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;</div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;<a class="code" href="structLado.html">Lado</a> <a class="code" href="API_8c.html#a9e15564793011091c7a8760cc8f1a6b5">LeerUnLado</a>(<span class="keywordtype">void</span>){</div>
<div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="API_8h.html#a9e15564793011091c7a8760cc8f1a6b5">  211</a></span>&#160;    <a class="code" href="structLado.html">Lado</a> edge = <a class="code" href="lado_8h.html#a90b033fe9661d1b5a94b418825575f94">LadoNulo</a>;   <span class="comment">/*El lado con los datos leídos*/</span></div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    Lexer *input;           <span class="comment">/*Analizador léxico por lineas de un archivo*/</span></div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    <span class="keywordtype">int</span> clean = <a class="code" href="parser__lado_8h.html#ae4cf8ecab1aab3f86db880a3aa9c9e19">PARSER_OK</a>;  <span class="comment">/*Indica si no se encontró basura al parsear*/</span></div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;   </div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;    <span class="comment">/*Construyo el lexer sobre la entrada estándar*/</span></div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    input = <a class="code" href="__lexer_8c.html#aab02b4d1aa9740ac7a34420b4b9bbd6d">lexer_new</a>(stdin);</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;    <span class="keywordflow">if</span> (input != NULL){</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;        <span class="comment">/*Leo un lado mientras no llegue a un fin de archivo o algún error*/</span></div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;        <span class="keywordflow">if</span> (!<a class="code" href="__lexer_8c.html#aef5130d55b06d8a9e22a76dab34df192">lexer_is_off</a>(input)){</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;            <span class="comment">/*Se parsea un lado*/</span></div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;            edge = <a class="code" href="parser__lado_8c.html#a333eb635ada6c988a7734f60094844b5">parser_lado</a>(input);</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;            <span class="comment">/*Se corre el parseo hasta la siguiente linea (o fin de archivo)*/</span></div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;            clean = <a class="code" href="parser__lado_8c.html#ab7926b7db6f62e0136312eb5c39a726a">parser_nextLine</a>(input);</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;            <span class="comment">/*Si habia basura, error*/</span></div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;            <span class="keywordflow">if</span> (edge != <a class="code" href="lado_8h.html#a90b033fe9661d1b5a94b418825575f94">LadoNulo</a> &amp;&amp; !clean){</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;                <a class="code" href="lado_8c.html#a701f41b841de7dd1527696515ed67bde">lado_destroy</a>(edge);</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;                edge = <a class="code" href="lado_8h.html#a90b033fe9661d1b5a94b418825575f94">LadoNulo</a>;</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;            }</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;        }</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;        <a class="code" href="__lexer_8c.html#a12aff8e140d703e68362dc301a3ade01">lexer_destroy</a>(input);</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    }</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;    </div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;    <span class="keywordflow">return</span> edge;</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;}</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;<span class="keywordtype">int</span> <a class="code" href="API_8c.html#ae65b8790af6d660290a77b9d84ec9897">CargarUnLado</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova, <a class="code" href="structLado.html">Lado</a> edge){</div>
<div class="line"><a name="l00247"></a><span class="lineno"><a class="line" href="API_8h.html#af8c34be2ee64ee6db056b641ce4be085">  247</a></span>&#160;    <a class="code" href="structNetwork.html">Network</a> *x = NULL;  <span class="comment">/*Nodo &#39;x&#39;*/</span></div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;    <a class="code" href="structNetwork.html">Network</a> *y = NULL;  <span class="comment">/*Nodo &#39;y&#39;*/</span></div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;    <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> xName, yName;   <span class="comment">/*Nombres del nodo &#39;x&#39; e &#39;y&#39;*/</span></div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    <span class="keywordtype">int</span> result = 0;     <span class="comment">/*Retorno*/</span></div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;    </div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    assert(dova != NULL);</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;    </div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;    <span class="keywordflow">if</span> (edge != <a class="code" href="lado_8h.html#a90b033fe9661d1b5a94b418825575f94">LadoNulo</a>){</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;        xName = <a class="code" href="lado_8c.html#aa684fbc52c931f51bd3516e911658b72">lado_getX</a>(edge);</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;        <span class="comment">/*Cargo el nodo &#39;x&#39;, si todavía no existe en el network*/</span></div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;        <a class="code" href="____uthash_8h.html#ad4a1cd39c3044936c0e49d3f372c9dbf">HASH_FIND</a>(hhNet, dova-&gt;net, &amp;(xName), <span class="keyword">sizeof</span>(xName), x);</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        <span class="keywordflow">if</span> (x == NULL){</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;            x = <a class="code" href="API_8c.html#a70536e45ffcb80d6c558b8452c849990">network_create</a>(xName);</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;            <a class="code" href="____uthash_8h.html#aaf01358e257c8d838eb5e4b189f0c399">HASH_ADD</a>(hhNet, dova-&gt;net, name, <span class="keyword">sizeof</span>(dova-&gt;net-&gt;name), x);</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;        }</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;        </div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;        yName = <a class="code" href="lado_8c.html#ac67229f7a5f55dd9d2c0dd8caea42c27">lado_getY</a>(edge);</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;        <span class="comment">/*Cargo el nodo &#39;y&#39;, si todavía no existe en el network*/</span></div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;        <a class="code" href="____uthash_8h.html#ad4a1cd39c3044936c0e49d3f372c9dbf">HASH_FIND</a>(hhNet, dova-&gt;net, &amp;(yName), <span class="keyword">sizeof</span>(yName), y);</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;        <span class="keywordflow">if</span> (y == NULL){</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;            y = <a class="code" href="API_8c.html#a70536e45ffcb80d6c558b8452c849990">network_create</a>(yName);</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;            <a class="code" href="____uthash_8h.html#aaf01358e257c8d838eb5e4b189f0c399">HASH_ADD</a>(hhNet, dova-&gt;net, name, <span class="keyword">sizeof</span>(dova-&gt;net-&gt;name), y);</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        }</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;        <span class="comment">/*Se establecen como vecinos. Arista &#39;xy&#39;*/</span></div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;        <a class="code" href="nbrhd_8c.html#adba3ec97b97e982e7f5bfc486e9e22b5">nbrhd_addEdge</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, y-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, edge);</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        result = 1;</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;        <a class="code" href="lado_8c.html#a701f41b841de7dd1527696515ed67bde">lado_destroy</a>(edge); <span class="comment">/*Destruyo el lado, ya no nos sirve*/</span></div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    }</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;    </div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;    <span class="keywordflow">return</span> result;</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;}</div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;<span class="keywordtype">int</span> <a class="code" href="API_8c.html#a65c95d25866c0cf86e927afdae88de04">Prepararse</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova){</div>
<div class="line"><a name="l00290"></a><span class="lineno"><a class="line" href="API_8h.html#a65c95d25866c0cf86e927afdae88de04">  290</a></span>&#160;    <span class="keywordtype">int</span> status = 0;       <span class="comment">/*Estado de los preparativos. Retorno*/</span></div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    <a class="code" href="structNetwork.html">Network</a> *s = NULL;    <span class="comment">/*nodo fuente &#39;s&#39; en el network*/</span></div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <a class="code" href="structNetwork.html">Network</a> *t = NULL;    <span class="comment">/*nodo resumidero &#39;t&#39; en el network*/</span></div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    </div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;    assert(dova != NULL);</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;    <span class="comment">/*Si la fuente y el resumidero están fijados entonces chequeo que existen</span></div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;<span class="comment">     en el network*/</span></div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a>(<a class="code" href="API_8c.html#adb1aacb84dbc34f3a142a9d7bc80f375">SINK</a>) &amp;&amp; <a class="code" href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a>(<a class="code" href="API_8c.html#a88cabaa30cba6807a1c75eaa7e4c188e">SOURCE</a>)){</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;        <span class="comment">/*Se buscan en el network*/</span></div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;        <a class="code" href="____uthash_8h.html#ad4a1cd39c3044936c0e49d3f372c9dbf">HASH_FIND</a>(hhNet, dova-&gt;net, &amp;(dova-&gt;src), <span class="keyword">sizeof</span>(dova-&gt;src), s);</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;        <a class="code" href="____uthash_8h.html#ad4a1cd39c3044936c0e49d3f372c9dbf">HASH_FIND</a>(hhNet, dova-&gt;net, &amp;(dova-&gt;snk), <span class="keyword">sizeof</span>(dova-&gt;snk), t);</div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;        <span class="keywordflow">if</span> (s != NULL &amp;&amp; t != NULL) </div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;            status = 1; <span class="comment">/*Ambos existen, todo OK*/</span></div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;    }</div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;    <span class="keywordflow">return</span> status;</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;}</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;<span class="keywordtype">int</span> <a class="code" href="API_8c.html#a09eaf8b3175729e94d54c88f96b230da">ActualizarDistancias</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova){</div>
<div class="line"><a name="l00320"></a><span class="lineno"><a class="line" href="API_8h.html#a09eaf8b3175729e94d54c88f96b230da">  320</a></span>&#160;    <a class="code" href="structQueue.html">Queue</a> q, qNext;         <span class="comment">/*Colas para el manejo de los niveles. </span></div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;<span class="comment">                            q = nodos del nivel actual; qNext = del siguiente*/</span></div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;    <a class="code" href="structNetwork.html">Network</a> *node = NULL;   <span class="comment">/*Nodo actual de &#39;q&#39; en el cual se itera*/</span></div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;    <a class="code" href="structNetwork.html">Network</a> *k = NULL;      <span class="comment">/*Iterador para reseteo de las distancias*/</span></div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;</div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;    assert(dova != NULL);</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;    </div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;    <span class="comment">/*Preparación de las cosas que voy a usar*/</span></div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;    <a class="code" href="API_8c.html#a9db4153fec89607db0b7bb7fe9cda7d1">UNSET_FLAG</a>(<a class="code" href="API_8c.html#ac378f92787011df9178de5ddbfd431e9">SINK_REACHED</a>);</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;    <a class="code" href="____uthash_8h.html#a0512b3f7a824275579ec82643ef2cc23">HASH_CLEAR</a>(hhCut, dova-&gt;cut);</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;    q = <a class="code" href="__queue_8c.html#a24a786275016ae7b4831f94fa44dd6a8">queue_create</a>();</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;    qNext = <a class="code" href="__queue_8c.html#a24a786275016ae7b4831f94fa44dd6a8">queue_create</a>();</div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;    </div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;    <span class="comment">/* Reset de distancias por llamadas anteriores*/</span></div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;    <span class="keywordflow">for</span>(k = dova-&gt;net; k != NULL; k = k-&gt;<a class="code" href="structNetwork.html#ae7b1690ddd7f2fa9f4d567b20df26d2b">hhNet</a>.<a class="code" href="structUT__hash__handle.html#a75b19ffcca77bfc647ff02695958fd95">next</a>){</div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;        k-&gt;<a class="code" href="structNetwork.html#a6c7f440bf2fb555abdc789a41c6acf44">lvl</a> = <a class="code" href="API_8c.html#a944eff1e60dc7aa1a80a3d74581d59c8">LVL_NIL</a>;</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;    }    </div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;    <span class="comment">/*La fuente es nivel 0*/</span></div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;    <a class="code" href="____uthash_8h.html#ad4a1cd39c3044936c0e49d3f372c9dbf">HASH_FIND</a>(hhNet, dova-&gt;net, &amp;(dova-&gt;src), <span class="keyword">sizeof</span>(dova-&gt;src), node);</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;    assert(node != NULL);</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;    node-&gt;<a class="code" href="structNetwork.html#a6c7f440bf2fb555abdc789a41c6acf44">lvl</a> = 0;</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;    <a class="code" href="__queue_8c.html#aa4f9f9bfddcb1edb5edce74730fe309b">queue_enqueue</a>(q, node);</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;    <span class="comment">/*Actualización de distancias por BFS */</span></div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;    <span class="keywordflow">while</span>(!<a class="code" href="__queue_8c.html#ae9892369297db38bc1b7955a310f8c30">queue_isEmpty</a>(q) &amp;&amp; !<a class="code" href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a>(<a class="code" href="API_8c.html#ac378f92787011df9178de5ddbfd431e9">SINK_REACHED</a>)){</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;        node = <a class="code" href="__queue_8c.html#a211ac9b50a8c7917a328cf68efb1f7e9">queue_head</a>(q);</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;        <span class="comment">/*Actualización de niveles de distancia de los nodos vecinos de &#39;node&#39;*/</span></div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;        <a class="code" href="API_8c.html#a9026c1ef7ab01411b3c7b03c56a06fee">set_lvlNbrs</a>(dova, node, qNext);</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;        <span class="comment">/*Agrego &#39;node&#39; al corte*/</span></div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;        <a class="code" href="____uthash_8h.html#aaf01358e257c8d838eb5e4b189f0c399">HASH_ADD</a>(hhCut, dova-&gt;cut, name, <span class="keyword">sizeof</span>(dova-&gt;cut-&gt;name), node);</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;        <a class="code" href="__queue_8c.html#a1f8653e2322de90458051e3061af90ce">queue_dequeue</a>(q);</div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;        <span class="comment">/*Si se terminaron los nodos de este nivel, se pasa al siguiente*/</span></div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;        <span class="keywordflow">if</span>(<a class="code" href="__queue_8c.html#ae9892369297db38bc1b7955a310f8c30">queue_isEmpty</a>(q))</div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;            <a class="code" href="__queue_8c.html#ac713676fd6b09455383d4f6276ce1d8d">queue_swap</a>(&amp;q, &amp;qNext);</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;    }</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;    <span class="comment">/*Si se alcanzo &#39;t&#39;*/</span></div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a>(<a class="code" href="API_8c.html#ac378f92787011df9178de5ddbfd431e9">SINK_REACHED</a>)){</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;        <a class="code" href="____uthash_8h.html#a0512b3f7a824275579ec82643ef2cc23">HASH_CLEAR</a>(hhCut, dova-&gt;cut);   <span class="comment">/*EL corte no es minimal, no me sirve*/</span></div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;    }<span class="keywordflow">else</span></div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;        <a class="code" href="API_8c.html#a83b5b7cc41c6290c3c2ae4824ac66cb7">SET_FLAG</a>(<a class="code" href="API_8c.html#a84e808ec7691e6cce6b82b12fc4fd8ce">MAXFLOW</a>);  <span class="comment">/*El flujo es maximal =&gt; hay corte minimal*/</span></div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;    <a class="code" href="__queue_8c.html#aa3ba377a4b21e817c50a4e52607cb94a">queue_destroy</a>(q, NULL);</div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;    <a class="code" href="__queue_8c.html#aa3ba377a4b21e817c50a4e52607cb94a">queue_destroy</a>(qNext, NULL);</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a>(<a class="code" href="API_8c.html#ac378f92787011df9178de5ddbfd431e9">SINK_REACHED</a>);</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;}</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;</div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;<span class="keywordtype">int</span> <a class="code" href="API_8c.html#a18f90f81fcff3eaa0d54c05f6c1c5315">BusquedaCaminoAumentante</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova){</div>
<div class="line"><a name="l00383"></a><span class="lineno"><a class="line" href="API_8h.html#a18f90f81fcff3eaa0d54c05f6c1c5315">  383</a></span>&#160;    <a class="code" href="structNetwork.html">Network</a> *x = NULL;      <span class="comment">/*Ultimo nodo agregado al path (ancestro)*/</span></div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;    <a class="code" href="structNetwork.html">Network</a> *y = NULL;      <span class="comment">/*Nodo candidato a agregarse al path*/</span></div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;    <span class="keywordtype">int</span> t_reached = 0;      <span class="comment">/*Indica si se alcanzó &#39;t&#39;*/</span></div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;    <span class="keywordtype">short</span> <span class="keywordtype">int</span> dir;          <span class="comment">/*Dirección de un nodo con su ancestro en el path*/</span></div>
<div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;    <span class="comment">/*Network *k = NULL;*/</span>  <span class="comment">/*Iterador para reseteo de direcciones*/</span></div>
<div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;    </div>
<div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;    assert(dova != NULL);</div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;    <span class="comment">/* Reset de direcciones(solo sirve por motivos de debuggin y aumenta el </span></div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;<span class="comment">     *tiempo de procesamiento)*/</span></div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;    <span class="comment">/*for(k = dova-&gt;net; k != NULL; k = k-&gt;hhNet.next){</span></div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;<span class="comment">        k-&gt;pDir = DIR_NIL;</span></div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;<span class="comment">    }*/</span></div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;    </div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;    <span class="comment">/*No se busca un nuevo camino aumentante si uno anterior encontrado todavía</span></div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;<span class="comment">     no se uso para aumentar flujo*/</span></div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a>(<a class="code" href="API_8c.html#abb9984ff33110d421bbb4eead3292bb0">PATHUSED</a>)){</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;        <span class="keywordflow">if</span> (dova-&gt;path != NULL)</div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;            <a class="code" href="__stack_8c.html#ac21780acf29f6bc27fd404a61b0b2fd8">stack_destroy</a>(dova-&gt;path, NULL);    <span class="comment">/*Destruyo el path viejo*/</span></div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;        dova-&gt;path = <a class="code" href="__stack_8c.html#adbe0fc6f4fbbfd3266b7ebeadd413cd3">stack_create</a>();</div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;        <span class="comment">/*Busco a &#39;s&#39; y lo agrego al path (notar &#39;x&#39; = &#39;s&#39;)*/</span></div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;        <a class="code" href="____uthash_8h.html#ad4a1cd39c3044936c0e49d3f372c9dbf">HASH_FIND</a>(hhNet, dova-&gt;net, &amp;(dova-&gt;src), <span class="keyword">sizeof</span>(dova-&gt;src), x); </div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;        <a class="code" href="__stack_8c.html#ab0aed143ba08a11614cf428f26330750">stack_push</a>(dova-&gt;path, x);</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;        <span class="keywordflow">while</span>(!<a class="code" href="__stack_8c.html#aceecd8ac8ccae30bcca91b877843e434">stack_isEmpty</a>(dova-&gt;path) &amp;&amp; (x-&gt;<a class="code" href="structNetwork.html#ad1d9cbcfd37b9b413e8d8d67a719d165">name</a> != dova-&gt;snk)){</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;            <span class="comment">/*Busco el siguiente nodo que cualifica para el camino aumentante*/</span></div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;            y = <a class="code" href="API_8c.html#a90aefbc8ffa273f827dc6122b7e85466">network_nextNode</a>(dova-&gt;net, x, &amp;dir);</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;            <span class="keywordflow">if</span>(y != NULL){</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;                <span class="comment">/*Se agrega al camino con la dirección que es agregado*/</span></div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;                y-&gt;<a class="code" href="structNetwork.html#aa951a7b2858ea82e9e873cb8b9b6a055">pDir</a> = dir;</div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;                <a class="code" href="__stack_8c.html#ab0aed143ba08a11614cf428f26330750">stack_push</a>(dova-&gt;path, y);</div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;                x = y;</div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;            }<span class="keywordflow">else</span>{  </div>
<div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;                <span class="comment">/*No se puede avanzar. Bloqueo y pruebo con el próximo top.*/</span></div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;                x-&gt;<a class="code" href="structNetwork.html#a6c7f440bf2fb555abdc789a41c6acf44">lvl</a> = <a class="code" href="API_8c.html#a944eff1e60dc7aa1a80a3d74581d59c8">LVL_NIL</a>;</div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;                <a class="code" href="__stack_8c.html#a72101773b7770f4aef2041f5b0d5e959">stack_pop</a>(dova-&gt;path);</div>
<div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;                x = (<a class="code" href="structNetwork.html">Network</a>*)<a class="code" href="__stack_8c.html#ac271ba7c9291dd690642ee6a28faf2de">stack_top</a>(dova-&gt;path); </div>
<div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;            }</div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;        }</div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;    }</div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;    <span class="comment">/*Si se encontró camino aumentante es que llego a &#39;t&#39;*/</span></div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;    <span class="keywordflow">if</span> (dova-&gt;path != NULL &amp;&amp; !<a class="code" href="__stack_8c.html#aceecd8ac8ccae30bcca91b877843e434">stack_isEmpty</a>(dova-&gt;path)){</div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;        t_reached = ((<a class="code" href="structNetwork.html">Network</a>*)<a class="code" href="__stack_8c.html#ac271ba7c9291dd690642ee6a28faf2de">stack_top</a>(dova-&gt;path))-&gt;name == dova-&gt;snk;</div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;        if (t_reached) <span class="comment">/*El path se puede usar para aumentar flujo*/</span></div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;            <a class="code" href="API_8c.html#a9db4153fec89607db0b7bb7fe9cda7d1">UNSET_FLAG</a>(<a class="code" href="API_8c.html#abb9984ff33110d421bbb4eead3292bb0">PATHUSED</a>); </div>
<div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;    }</div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;    <span class="keywordflow">return</span> t_reached;</div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;}</div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;</div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;<a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> <a class="code" href="API_8c.html#a7fadfdae8bf188ab9889b75942729359">AumentarFlujo</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova){</div>
<div class="line"><a name="l00442"></a><span class="lineno"><a class="line" href="API_8h.html#a7fadfdae8bf188ab9889b75942729359">  442</a></span>&#160;    <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> pflow = 0;      <span class="comment">/*Flujo a enviar por el camino aumentante*/</span> </div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;    <a class="code" href="structNetwork.html">Network</a> *x = NULL;  <span class="comment">/*Nodo &#39;x&#39; de una arista &#39;xy&#39;. Ancestro de &#39;y&#39;*/</span></div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;    <a class="code" href="structNetwork.html">Network</a> *y = NULL;  <span class="comment">/*Nodo &#39;y&#39; de una arista &#39;xy&#39;*/</span></div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;    </div>
<div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;    assert(dova != NULL);</div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;    <span class="comment">/*Precondicion de que el camino no se uso para aumentar flujo*/</span></div>
<div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a>(<a class="code" href="API_8c.html#abb9984ff33110d421bbb4eead3292bb0">PATHUSED</a>)){</div>
<div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;        pflow = <a class="code" href="API_8c.html#a493f4aff33fcec0bda5b03c499de4921">get_pathFlow</a>(dova);</div>
<div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;        <span class="comment">/*Incremento del flujo sobre cada arista &#39;xy&#39;.*/</span></div>
<div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;        <a class="code" href="API_8c.html#a73ce2e5e598ed903df3611b1da1a653d">PATH_ITER</a>(dova-&gt;path, x, y){</div>
<div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;            <span class="comment">/*por BWD se reduce el flujo sobre esta arista*/</span></div>
<div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;            <a class="code" href="nbrhd_8c.html#ab32ddc38828b7a18e3dfba02180ce6fa">nbrhd_increaseFlow</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, y-&gt;<a class="code" href="structNetwork.html#ad1d9cbcfd37b9b413e8d8d67a719d165">name</a>, y-&gt;<a class="code" href="structNetwork.html#aa951a7b2858ea82e9e873cb8b9b6a055">pDir</a>, pflow);</div>
<div class="line"><a name="l00454"></a><span class="lineno">  454</span>&#160;        }</div>
<div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;        dova-&gt;flow += pflow; </div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;        dova-&gt;pCounter++;</div>
<div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;    }</div>
<div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;    <a class="code" href="API_8c.html#a83b5b7cc41c6290c3c2ae4824ac66cb7">SET_FLAG</a>(<a class="code" href="API_8c.html#abb9984ff33110d421bbb4eead3292bb0">PATHUSED</a>);</div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;    <span class="keywordflow">return</span> pflow;</div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;}</div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;</div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;<a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> <a class="code" href="API_8c.html#af116b369240f80dd16135b9837d99321">AumentarFlujoYTambienImprimirCamino</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova){</div>
<div class="line"><a name="l00475"></a><span class="lineno"><a class="line" href="API_8h.html#af116b369240f80dd16135b9837d99321">  475</a></span>&#160;    <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> pflow = 0;      <span class="comment">/*Flujo a enviar por el camino aumentante*/</span> </div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;    <a class="code" href="structNetwork.html">Network</a> *x = NULL;  <span class="comment">/*Nodo &#39;x&#39; de una arista &#39;xy&#39;. Ancestro de &#39;y&#39;*/</span></div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;    <a class="code" href="structNetwork.html">Network</a> *y = NULL;  <span class="comment">/*Nodo &#39;y&#39; de una arista &#39;xy&#39;*/</span></div>
<div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;    </div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;    assert(dova != NULL);</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;    <span class="comment">/*precondición de que el camino no se uso para aumentar flujo*/</span></div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a>(<a class="code" href="API_8c.html#abb9984ff33110d421bbb4eead3292bb0">PATHUSED</a>)){</div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;        <span class="comment">/*Aumento el flujo*/</span></div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;        pflow = <a class="code" href="API_8c.html#a7fadfdae8bf188ab9889b75942729359">AumentarFlujo</a>(dova);</div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;        <span class="comment">/*Imprimo el camino*/</span> </div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;        printf(<span class="stringliteral">&quot;camino aumentante %&quot;</span>PRIu64<span class="stringliteral">&quot;:\nt&quot;</span>, dova-&gt;pCounter );      </div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;        <a class="code" href="API_8c.html#a73ce2e5e598ed903df3611b1da1a653d">PATH_ITER</a>(dova-&gt;path, x, y){</div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;            <span class="keywordflow">if</span>(y-&gt;<a class="code" href="structNetwork.html#aa951a7b2858ea82e9e873cb8b9b6a055">pDir</a> == <a class="code" href="nbrhd_8h.html#aa02f16883c5ce325e2dbb8c3835aa9a1">FWD</a>){</div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;                <span class="keywordflow">if</span>(x-&gt;<a class="code" href="structNetwork.html#ad1d9cbcfd37b9b413e8d8d67a719d165">name</a> != dova-&gt;src)</div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;                    printf(<span class="stringliteral">&quot;;%&quot;</span>PRIu64, x-&gt;<a class="code" href="structNetwork.html#ad1d9cbcfd37b9b413e8d8d67a719d165">name</a>);</div>
<div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;                <span class="keywordflow">else</span></div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;                    printf(<span class="stringliteral">&quot;;s&quot;</span>);</div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;            }<span class="keywordflow">else</span></div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;                printf(<span class="stringliteral">&quot;&gt;%&quot;</span>PRIu64, x-&gt;<a class="code" href="structNetwork.html#ad1d9cbcfd37b9b413e8d8d67a719d165">name</a>);</div>
<div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;        }</div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;        printf(<span class="stringliteral">&quot;: &lt;%&quot;</span>PRIu64<span class="stringliteral">&quot;&gt;\n&quot;</span>, pflow);</div>
<div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;    }</div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;    <a class="code" href="API_8c.html#a83b5b7cc41c6290c3c2ae4824ac66cb7">SET_FLAG</a>(<a class="code" href="API_8c.html#abb9984ff33110d421bbb4eead3292bb0">PATHUSED</a>);</div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;    <span class="keywordflow">return</span> pflow;</div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;}</div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;</div>
<div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;<span class="keywordtype">void</span> <a class="code" href="API_8c.html#aa5169c5746c8931c31cdeb0c38bf9c1e">ImprimirFlujo</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova){</div>
<div class="line"><a name="l00511"></a><span class="lineno"><a class="line" href="API_8h.html#aa5169c5746c8931c31cdeb0c38bf9c1e">  511</a></span>&#160;    <a class="code" href="structNetwork.html">Network</a> *x = NULL;      <span class="comment">/*Nodo actual de la iteración.*/</span></div>
<div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;    <a class="code" href="structNetwork.html">Network</a> *ref = NULL;    <span class="comment">/*Lo necesita HASH_ITER para no perder referencias*/</span></div>
<div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;    <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> yName;              <span class="comment">/*Nombre del nodo &#39;y&#39;, vecino del nodo &#39;x&#39;*/</span></div>
<div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;    <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> vflow = 0;          <span class="comment">/*Valor del flujo del lado a imprimir*/</span></div>
<div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;    <span class="keywordtype">int</span> rqst;               <span class="comment">/*Manejo de rqst para la búsqueda de nodos vecinos*/</span></div>
<div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;    </div>
<div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;    assert(dova != NULL);</div>
<div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;    </div>
<div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a>(<a class="code" href="API_8c.html#a84e808ec7691e6cce6b82b12fc4fd8ce">MAXFLOW</a>))</div>
<div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;        printf(<span class="stringliteral">&quot;Flujo maximal:\n&quot;</span>);</div>
<div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;        printf(<span class="stringliteral">&quot;Flujo no maximal:\n&quot;</span>);</div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;    <span class="comment">/*Itero sobre cada nodo del network.*/</span></div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;    <a class="code" href="____uthash_8h.html#a4d524042f1fcb976d8bccae9e4cc63d6">HASH_ITER</a>(hhNet, dova-&gt;net, x, ref){</div>
<div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;        rqst = <a class="code" href="nbrhd_8h.html#acfb785e5d4271a2e7d9023de22c90495">FST</a>;</div>
<div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;        <span class="comment">/*Imprimo todos los lados &#39;xy&#39; hasta acabar los vecinos*/</span></div>
<div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;        <span class="keywordflow">while</span>(<a class="code" href="nbrhd_8c.html#ad0c3e02751a0077f2bf1f90e4d0384d1">nbrhd_getFwd</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, rqst, &amp;yName)){</div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;            vflow = <a class="code" href="nbrhd_8c.html#afc04eb8a4ab84cddef449ba3f698f6d8">nbrhd_getFlow</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, yName, <a class="code" href="nbrhd_8h.html#aa02f16883c5ce325e2dbb8c3835aa9a1">FWD</a>);</div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;            printf(<span class="stringliteral">&quot;Lado %&quot;</span>PRIu64<span class="stringliteral">&quot;,%&quot;</span>PRIu64<span class="stringliteral">&quot;: %&quot;</span>PRIu64<span class="stringliteral">&quot;\n&quot;</span>,x-&gt;<a class="code" href="structNetwork.html#ad1d9cbcfd37b9b413e8d8d67a719d165">name</a>, yName, </div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;                   vflow);</div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;            rqst = <a class="code" href="nbrhd_8h.html#a553fc2c3e5597c822f21145286924748">NXT</a>;</div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;        }</div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;    }</div>
<div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;    printf(<span class="stringliteral">&quot;\n&quot;</span>);</div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;}</div>
<div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;</div>
<div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;<span class="keywordtype">void</span> <a class="code" href="API_8c.html#a4e475a7fbb00903addb0ea50b31a323e">ImprimirValorFlujo</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova){</div>
<div class="line"><a name="l00545"></a><span class="lineno"><a class="line" href="API_8h.html#a4e475a7fbb00903addb0ea50b31a323e">  545</a></span>&#160;    assert(dova != NULL);</div>
<div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;    <span class="keywordflow">if</span>(<a class="code" href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a>(<a class="code" href="API_8c.html#a84e808ec7691e6cce6b82b12fc4fd8ce">MAXFLOW</a>))</div>
<div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;        printf(<span class="stringliteral">&quot;Valor del flujo maximal: %&quot;</span>PRIu64<span class="stringliteral">&quot;\n&quot;</span>, dova-&gt;flow);</div>
<div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;    <span class="keywordflow">else</span></div>
<div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;        printf(<span class="stringliteral">&quot;Valor del flujo no maximal: %&quot;</span>PRIu64<span class="stringliteral">&quot;\n&quot;</span>, dova-&gt;flow);</div>
<div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;}</div>
<div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;</div>
<div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;<span class="keywordtype">void</span> <a class="code" href="API_8c.html#aa9391cd1d082becf7c6cd3add3020b94">ImprimirCorte</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova){</div>
<div class="line"><a name="l00567"></a><span class="lineno"><a class="line" href="API_8h.html#aa9391cd1d082becf7c6cd3add3020b94">  567</a></span>&#160;    <a class="code" href="structNetwork.html">Network</a> *x = NULL;      <span class="comment">/*Nodo que pertenece al corte*/</span></div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;    <a class="code" href="structNetwork.html">Network</a> *y = NULL;      <span class="comment">/*Nodo vecino de &#39;x&#39;*/</span></div>
<div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;    <a class="code" href="structNetwork.html">Network</a> *ref = NULL;    <span class="comment">/*Lo necesita HASH_ITER para no perder referencias*/</span></div>
<div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;    <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> yName;              <span class="comment">/*Nombre del nodo &#39;y&#39;*/</span></div>
<div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;    <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> capCut = 0;         <span class="comment">/*Capacidad del corte*/</span></div>
<div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;    <span class="keywordtype">int</span> rqst;               <span class="comment">/*Para establecer pedidos de busqueda de vecinos*/</span></div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;    </div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;    assert(dova!=NULL);</div>
<div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;    assert(dova-&gt;cut!=NULL &amp;&amp; <a class="code" href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a>(<a class="code" href="API_8c.html#a84e808ec7691e6cce6b82b12fc4fd8ce">MAXFLOW</a>));</div>
<div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;    </div>
<div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;    printf(<span class="stringliteral">&quot;Corte Minimal: S = {s&quot;</span>);</div>
<div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;    <span class="comment">/*Itero sobre cada nodo del corte.*/</span></div>
<div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;    <a class="code" href="____uthash_8h.html#a4d524042f1fcb976d8bccae9e4cc63d6">HASH_ITER</a>(hhCut, dova-&gt;cut, x, ref){</div>
<div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;        rqst = <a class="code" href="nbrhd_8h.html#acfb785e5d4271a2e7d9023de22c90495">FST</a>;</div>
<div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;        <span class="comment">/*Itero sobre los vecinos de &#39;x&#39;*/</span></div>
<div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;        <span class="keywordflow">while</span>(<a class="code" href="nbrhd_8c.html#ad0c3e02751a0077f2bf1f90e4d0384d1">nbrhd_getFwd</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, rqst, &amp;yName)){</div>
<div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;            <span class="comment">/*Me fijo si el vecino &#39;y&#39; esta en el corte*/</span></div>
<div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;            <a class="code" href="____uthash_8h.html#ad4a1cd39c3044936c0e49d3f372c9dbf">HASH_FIND</a>(hhCut, dova-&gt;cut, &amp;yName, <span class="keyword">sizeof</span>(yName), y);</div>
<div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;            <span class="keywordflow">if</span>(y == NULL) <span class="comment">/*Esta en el complemento. Sumo la capacidad*/</span></div>
<div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;                capCut += <a class="code" href="nbrhd_8c.html#a0dd3e6d98e45f2bbf494d6bba07ffd15">nbrhd_getCap</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, yName, <a class="code" href="nbrhd_8h.html#aa02f16883c5ce325e2dbb8c3835aa9a1">FWD</a>);</div>
<div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;            rqst = <a class="code" href="nbrhd_8h.html#a553fc2c3e5597c822f21145286924748">NXT</a>;</div>
<div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;        }</div>
<div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;        <span class="keywordflow">if</span>(x-&gt;<a class="code" href="structNetwork.html#ad1d9cbcfd37b9b413e8d8d67a719d165">name</a> != dova-&gt;src)</div>
<div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;            printf(<span class="stringliteral">&quot;,%&quot;</span>PRIu64, x-&gt;<a class="code" href="structNetwork.html#ad1d9cbcfd37b9b413e8d8d67a719d165">name</a>);</div>
<div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;    }</div>
<div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;    printf(<span class="stringliteral">&quot;}\n&quot;</span>);</div>
<div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;    printf(<span class="stringliteral">&quot;Capacidad: %&quot;</span>PRIu64<span class="stringliteral">&quot;\n&quot;</span>, capCut);</div>
<div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;}</div>
<div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;</div>
<div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;</div>
<div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;</div>
<div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;<span class="comment">/* </span></div>
<div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;<span class="comment"> *          Funciones estáticas</span></div>
<div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;<span class="comment">*/</span></div>
<div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;</div>
<div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160;<span class="keyword">static</span> <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> <a class="code" href="API_8c.html#a493f4aff33fcec0bda5b03c499de4921">get_pathFlow</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova){</div>
<div class="line"><a name="l00609"></a><span class="lineno"><a class="line" href="API_8c.html#a493f4aff33fcec0bda5b03c499de4921">  609</a></span>&#160;    <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> pflow = <a class="code" href="__u64_8h.html#a330e2eeecd2ebf590a4bc942f1d9c1cf">u64_MAX</a>;    <span class="comment">/*valor de flujo de retorno*/</span></div>
<div class="line"><a name="l00610"></a><span class="lineno">  610</span>&#160;    <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> cap, flow;          <span class="comment">/*capacidad y valor de flujo*/</span></div>
<div class="line"><a name="l00611"></a><span class="lineno">  611</span>&#160;    <a class="code" href="structNetwork.html">Network</a> *x = NULL;      <span class="comment">/*nodo &#39;x&#39;*/</span></div>
<div class="line"><a name="l00612"></a><span class="lineno">  612</span>&#160;    <a class="code" href="structNetwork.html">Network</a> *y = NULL;      <span class="comment">/*nodo &#39;y&#39;*/</span></div>
<div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;    </div>
<div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;    assert(dova != NULL);</div>
<div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;    assert(!<a class="code" href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a>(<a class="code" href="API_8c.html#abb9984ff33110d421bbb4eead3292bb0">PATHUSED</a>));</div>
<div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160;    <span class="comment">/*Itero en el camino. &#39;x&#39; es ancestro de &#39;y&#39;*/</span></div>
<div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;    <a class="code" href="API_8c.html#a73ce2e5e598ed903df3611b1da1a653d">PATH_ITER</a>(dova-&gt;path, x, y){</div>
<div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;        flow = <a class="code" href="nbrhd_8c.html#afc04eb8a4ab84cddef449ba3f698f6d8">nbrhd_getFlow</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, y-&gt;<a class="code" href="structNetwork.html#ad1d9cbcfd37b9b413e8d8d67a719d165">name</a>, y-&gt;<a class="code" href="structNetwork.html#aa951a7b2858ea82e9e873cb8b9b6a055">pDir</a>);</div>
<div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;        <span class="comment">/*El calculo depende de la dirección en la que fue agregado &#39;y&#39;*/</span></div>
<div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;        <span class="keywordflow">if</span>(y-&gt;<a class="code" href="structNetwork.html#aa951a7b2858ea82e9e873cb8b9b6a055">pDir</a> == <a class="code" href="nbrhd_8h.html#aa02f16883c5ce325e2dbb8c3835aa9a1">FWD</a>){</div>
<div class="line"><a name="l00621"></a><span class="lineno">  621</span>&#160;            <span class="comment">/*&#39;y&#39; es vecino forward.*/</span></div>
<div class="line"><a name="l00622"></a><span class="lineno">  622</span>&#160;            cap = <a class="code" href="nbrhd_8c.html#a0dd3e6d98e45f2bbf494d6bba07ffd15">nbrhd_getCap</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, y-&gt;<a class="code" href="structNetwork.html#ad1d9cbcfd37b9b413e8d8d67a719d165">name</a>, <a class="code" href="nbrhd_8h.html#aa02f16883c5ce325e2dbb8c3835aa9a1">FWD</a>);</div>
<div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160;            pflow = <a class="code" href="__u64_8h.html#a645f984d9f5a6deb677738f67938df32">u64_min</a>(pflow, cap - flow);</div>
<div class="line"><a name="l00624"></a><span class="lineno">  624</span>&#160;        }<span class="keywordflow">else</span></div>
<div class="line"><a name="l00625"></a><span class="lineno">  625</span>&#160;            <span class="comment">/*&#39;y&#39; es vecino backward.*/</span></div>
<div class="line"><a name="l00626"></a><span class="lineno">  626</span>&#160;            pflow = <a class="code" href="__u64_8h.html#a645f984d9f5a6deb677738f67938df32">u64_min</a>(pflow, flow);</div>
<div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;    }</div>
<div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;    <span class="keywordflow">return</span> pflow;</div>
<div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;}</div>
<div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;</div>
<div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;<span class="keyword">static</span> <a class="code" href="structNetwork.html">Network</a> *<a class="code" href="API_8c.html#a70536e45ffcb80d6c558b8452c849990">network_create</a>(<a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> n){</div>
<div class="line"><a name="l00636"></a><span class="lineno"><a class="line" href="API_8c.html#a70536e45ffcb80d6c558b8452c849990">  636</a></span>&#160;    <a class="code" href="structNetwork.html">Network</a> *node;</div>
<div class="line"><a name="l00637"></a><span class="lineno">  637</span>&#160;    </div>
<div class="line"><a name="l00638"></a><span class="lineno">  638</span>&#160;    node = (<a class="code" href="structNetwork.html">Network</a>*) malloc(<span class="keyword">sizeof</span>(<a class="code" href="structNetwork.html">Network</a>));</div>
<div class="line"><a name="l00639"></a><span class="lineno">  639</span>&#160;    assert(node != NULL);</div>
<div class="line"><a name="l00640"></a><span class="lineno">  640</span>&#160;    </div>
<div class="line"><a name="l00641"></a><span class="lineno">  641</span>&#160;    node-&gt;<a class="code" href="structNetwork.html#ad1d9cbcfd37b9b413e8d8d67a719d165">name</a> = n;</div>
<div class="line"><a name="l00642"></a><span class="lineno">  642</span>&#160;    node-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a> = <a class="code" href="nbrhd_8c.html#a006b65686eb0a5b9866d5c820e080c36">nbrhd_create</a>();</div>
<div class="line"><a name="l00643"></a><span class="lineno">  643</span>&#160;    node-&gt;<a class="code" href="structNetwork.html#a6c7f440bf2fb555abdc789a41c6acf44">lvl</a> = <a class="code" href="API_8c.html#a944eff1e60dc7aa1a80a3d74581d59c8">LVL_NIL</a>;</div>
<div class="line"><a name="l00644"></a><span class="lineno">  644</span>&#160;    node-&gt;<a class="code" href="structNetwork.html#aa951a7b2858ea82e9e873cb8b9b6a055">pDir</a> = <a class="code" href="API_8c.html#ac103b05e521b20c12abb4320deccaa25">DIR_NIL</a>;</div>
<div class="line"><a name="l00645"></a><span class="lineno">  645</span>&#160;    </div>
<div class="line"><a name="l00646"></a><span class="lineno">  646</span>&#160;    <span class="keywordflow">return</span> node;</div>
<div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;}</div>
<div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160;</div>
<div class="line"><a name="l00653"></a><span class="lineno">  653</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="API_8c.html#a297e3676e6f1a95aa659bad307e143b0">network_destroy</a>(<a class="code" href="structNetwork.html">Network</a> *net){</div>
<div class="line"><a name="l00654"></a><span class="lineno"><a class="line" href="API_8c.html#a297e3676e6f1a95aa659bad307e143b0">  654</a></span>&#160;    assert(net!=NULL);</div>
<div class="line"><a name="l00655"></a><span class="lineno">  655</span>&#160;    <a class="code" href="nbrhd_8c.html#a011cf0e134a632ddac08a769e3275f22">nbrhd_destroy</a>(net-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>);</div>
<div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160;    free(net);</div>
<div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;}</div>
<div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;</div>
<div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;<span class="keyword">static</span> <a class="code" href="structNetwork.html">Network</a> *<a class="code" href="API_8c.html#a90aefbc8ffa273f827dc6122b7e85466">network_nextNode</a>(<a class="code" href="structNetwork.html">Network</a> *net, <a class="code" href="structNetwork.html">Network</a> *x, <span class="keywordtype">short</span> <span class="keywordtype">int</span> *dir){</div>
<div class="line"><a name="l00671"></a><span class="lineno"><a class="line" href="API_8c.html#a90aefbc8ffa273f827dc6122b7e85466">  671</a></span>&#160;    <a class="code" href="structNetwork.html">Network</a> *y = NULL;    <span class="comment">/*El nodo candidato a ser el siguiente. Retorno*/</span></div>
<div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;    <span class="keywordtype">int</span> getNbr;           <span class="comment">/*Resultado de los nbrhd_getX()*/</span></div>
<div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;    <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> yName;            <span class="comment">/*Nombre del nodo &#39;y&#39;*/</span></div>
<div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;    <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> flow, cap;        <span class="comment">/*Flujo y capacidad entre &#39;x&#39; e &#39;y&#39;*/</span></div>
<div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;    <span class="keywordtype">bool</span> breakW = <span class="keyword">false</span>;  <span class="comment">/*Termina la búsqueda iterativa*/</span></div>
<div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160;    </div>
<div class="line"><a name="l00677"></a><span class="lineno">  677</span>&#160;    assert(net != NULL &amp;&amp; x != NULL);</div>
<div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;    <span class="comment">/*Inicio con el primer vecino que encuentre*/</span></div>
<div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;    getNbr = <a class="code" href="nbrhd_8c.html#ad0c3e02751a0077f2bf1f90e4d0384d1">nbrhd_getFwd</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, <a class="code" href="nbrhd_8h.html#acfb785e5d4271a2e7d9023de22c90495">FST</a>, &amp;yName);</div>
<div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160;    <span class="keywordflow">if</span>(!getNbr){</div>
<div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;        getNbr = <a class="code" href="nbrhd_8c.html#a0563715d3cfbbb59cf3e83ef242283e2">nbrhd_getBwd</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, <a class="code" href="nbrhd_8h.html#acfb785e5d4271a2e7d9023de22c90495">FST</a>, &amp;yName);</div>
<div class="line"><a name="l00682"></a><span class="lineno">  682</span>&#160;        *dir = <a class="code" href="nbrhd_8h.html#ababc4097c218c2f90a92b311e09a8e42">BWD</a>;</div>
<div class="line"><a name="l00683"></a><span class="lineno">  683</span>&#160;    }<span class="keywordflow">else</span></div>
<div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160;        *dir = <a class="code" href="nbrhd_8h.html#aa02f16883c5ce325e2dbb8c3835aa9a1">FWD</a>;</div>
<div class="line"><a name="l00685"></a><span class="lineno">  685</span>&#160;        </div>
<div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;    <span class="keywordflow">while</span>(getNbr &amp;&amp; !breakW){</div>
<div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160;        <a class="code" href="____uthash_8h.html#ad4a1cd39c3044936c0e49d3f372c9dbf">HASH_FIND</a>(hhNet, net, &amp;yName, <span class="keyword">sizeof</span>(yName), y);</div>
<div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;        assert(y!=NULL);</div>
<div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;        <span class="comment">/*Compruebo si su distancia es mayor por 1 unidad*/</span></div>
<div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160;        <span class="keywordflow">if</span>(y-&gt;<a class="code" href="structNetwork.html#a6c7f440bf2fb555abdc789a41c6acf44">lvl</a> != <a class="code" href="API_8c.html#a944eff1e60dc7aa1a80a3d74581d59c8">LVL_NIL</a> &amp;&amp; y-&gt;<a class="code" href="structNetwork.html#a6c7f440bf2fb555abdc789a41c6acf44">lvl</a> == (x-&gt;<a class="code" href="structNetwork.html#a6c7f440bf2fb555abdc789a41c6acf44">lvl</a>+1)){ </div>
<div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;            flow = <a class="code" href="nbrhd_8c.html#afc04eb8a4ab84cddef449ba3f698f6d8">nbrhd_getFlow</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, yName, *dir);</div>
<div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;            cap = <a class="code" href="nbrhd_8c.html#a0dd3e6d98e45f2bbf494d6bba07ffd15">nbrhd_getCap</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, yName, *dir);</div>
<div class="line"><a name="l00693"></a><span class="lineno">  693</span>&#160;            <span class="comment">/*Compruebo el envio de flujo. True = Cumple lo requerido! salgo*/</span></div>
<div class="line"><a name="l00694"></a><span class="lineno">  694</span>&#160;            breakW = (*dir == <a class="code" href="nbrhd_8h.html#aa02f16883c5ce325e2dbb8c3835aa9a1">FWD</a> &amp;&amp; cap &gt; flow) || (*dir == <a class="code" href="nbrhd_8h.html#ababc4097c218c2f90a92b311e09a8e42">BWD</a> &amp;&amp; flow &gt; 0);</div>
<div class="line"><a name="l00695"></a><span class="lineno">  695</span>&#160;        }</div>
<div class="line"><a name="l00696"></a><span class="lineno">  696</span>&#160;        <span class="comment">/*Si no es valido, se descarta y busca otro (prioridad por FWD)*/</span></div>
<div class="line"><a name="l00697"></a><span class="lineno">  697</span>&#160;        <span class="keywordflow">if</span>(*dir == <a class="code" href="nbrhd_8h.html#aa02f16883c5ce325e2dbb8c3835aa9a1">FWD</a> &amp;&amp; !breakW){</div>
<div class="line"><a name="l00698"></a><span class="lineno">  698</span>&#160;            getNbr = <a class="code" href="nbrhd_8c.html#ad0c3e02751a0077f2bf1f90e4d0384d1">nbrhd_getFwd</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, <a class="code" href="nbrhd_8h.html#a553fc2c3e5597c822f21145286924748">NXT</a>, &amp;yName);</div>
<div class="line"><a name="l00699"></a><span class="lineno">  699</span>&#160;            <span class="keywordflow">if</span>(!getNbr){   <span class="comment">/*Se acabaron los FWD, sigo con los BWD*/</span></div>
<div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;                getNbr = <a class="code" href="nbrhd_8c.html#a0563715d3cfbbb59cf3e83ef242283e2">nbrhd_getBwd</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, <a class="code" href="nbrhd_8h.html#acfb785e5d4271a2e7d9023de22c90495">FST</a>, &amp;yName);</div>
<div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160;                *dir = <a class="code" href="nbrhd_8h.html#ababc4097c218c2f90a92b311e09a8e42">BWD</a>;</div>
<div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;            }</div>
<div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;        }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(*dir == <a class="code" href="nbrhd_8h.html#ababc4097c218c2f90a92b311e09a8e42">BWD</a> &amp;&amp; !breakW)</div>
<div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;            getNbr = <a class="code" href="nbrhd_8c.html#a0563715d3cfbbb59cf3e83ef242283e2">nbrhd_getBwd</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, <a class="code" href="nbrhd_8h.html#a553fc2c3e5597c822f21145286924748">NXT</a>, &amp;yName);</div>
<div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;    }</div>
<div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;</div>
<div class="line"><a name="l00707"></a><span class="lineno">  707</span>&#160;    <span class="keywordflow">if</span>(!breakW &amp;&amp; !getNbr)</div>
<div class="line"><a name="l00708"></a><span class="lineno">  708</span>&#160;        y = NULL;   <span class="comment">/*Ningún vecino cualifica*/</span></div>
<div class="line"><a name="l00709"></a><span class="lineno">  709</span>&#160;    </div>
<div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;    <span class="keywordflow">return</span> y;</div>
<div class="line"><a name="l00711"></a><span class="lineno">  711</span>&#160;}</div>
<div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160;</div>
<div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="API_8c.html#a9026c1ef7ab01411b3c7b03c56a06fee">set_lvlNbrs</a>(<a class="code" href="structDovahkiinP.html">DovahkiinP</a> dova, <a class="code" href="structNetwork.html">Network</a> *x, <a class="code" href="structQueue.html">Queue</a> upd){</div>
<div class="line"><a name="l00725"></a><span class="lineno"><a class="line" href="API_8c.html#a9026c1ef7ab01411b3c7b03c56a06fee">  725</a></span>&#160;    <a class="code" href="structNetwork.html">Network</a> *y = NULL;      <span class="comment">/*Nodo &#39;y&#39; vecino de &#39;x&#39; por actualizar*/</span></div>
<div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;    <span class="keywordtype">int</span> getNbr;             <span class="comment">/*Resultado de los nbrhd_getX()*/</span></div>
<div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;    <span class="keywordtype">int</span> dir = <a class="code" href="nbrhd_8h.html#aa02f16883c5ce325e2dbb8c3835aa9a1">FWD</a>;          <span class="comment">/*Dirección en la que se encuentra el vecino*/</span></div>
<div class="line"><a name="l00728"></a><span class="lineno">  728</span>&#160;    <a class="code" href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a> yName, cap, flow;   <span class="comment">/*Nombre del nodo &#39;y&#39;, capacidad y flujo con &#39;x&#39;*/</span></div>
<div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160;    </div>
<div class="line"><a name="l00730"></a><span class="lineno">  730</span>&#160;    assert(dova != NULL);</div>
<div class="line"><a name="l00731"></a><span class="lineno">  731</span>&#160;    assert(x != NULL &amp;&amp; upd != NULL);</div>
<div class="line"><a name="l00732"></a><span class="lineno">  732</span>&#160;    </div>
<div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160;    <span class="comment">/*Inicio con el primer vecino que encuentre*/</span></div>
<div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160;    getNbr = <a class="code" href="nbrhd_8c.html#ad0c3e02751a0077f2bf1f90e4d0384d1">nbrhd_getFwd</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, <a class="code" href="nbrhd_8h.html#acfb785e5d4271a2e7d9023de22c90495">FST</a>, &amp;yName);</div>
<div class="line"><a name="l00735"></a><span class="lineno">  735</span>&#160;    <span class="keywordflow">if</span>(!getNbr){</div>
<div class="line"><a name="l00736"></a><span class="lineno">  736</span>&#160;        getNbr = <a class="code" href="nbrhd_8c.html#a0563715d3cfbbb59cf3e83ef242283e2">nbrhd_getBwd</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, <a class="code" href="nbrhd_8h.html#acfb785e5d4271a2e7d9023de22c90495">FST</a>, &amp;yName);</div>
<div class="line"><a name="l00737"></a><span class="lineno">  737</span>&#160;        dir = <a class="code" href="nbrhd_8h.html#ababc4097c218c2f90a92b311e09a8e42">BWD</a>;</div>
<div class="line"><a name="l00738"></a><span class="lineno">  738</span>&#160;    }</div>
<div class="line"><a name="l00739"></a><span class="lineno">  739</span>&#160;    <span class="comment">/*No paro hasta que alcance &#39;t&#39; o se me acaben los vecinos*/</span></div>
<div class="line"><a name="l00740"></a><span class="lineno">  740</span>&#160;    <span class="keywordflow">while</span>(getNbr &amp;&amp; !<a class="code" href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a>(<a class="code" href="API_8c.html#ac378f92787011df9178de5ddbfd431e9">SINK_REACHED</a>)){</div>
<div class="line"><a name="l00741"></a><span class="lineno">  741</span>&#160;        flow = <a class="code" href="nbrhd_8c.html#afc04eb8a4ab84cddef449ba3f698f6d8">nbrhd_getFlow</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, yName, dir);</div>
<div class="line"><a name="l00742"></a><span class="lineno">  742</span>&#160;        cap = <a class="code" href="nbrhd_8c.html#a0dd3e6d98e45f2bbf494d6bba07ffd15">nbrhd_getCap</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, yName, dir);</div>
<div class="line"><a name="l00743"></a><span class="lineno">  743</span>&#160;        <span class="comment">/*Según su dirección, compruebo el envío de flujo*/</span></div>
<div class="line"><a name="l00744"></a><span class="lineno">  744</span>&#160;        <span class="keywordflow">if</span>((dir == <a class="code" href="nbrhd_8h.html#aa02f16883c5ce325e2dbb8c3835aa9a1">FWD</a> &amp;&amp; cap &gt; flow) || (dir == <a class="code" href="nbrhd_8h.html#ababc4097c218c2f90a92b311e09a8e42">BWD</a> &amp;&amp; flow &gt; 0)){</div>
<div class="line"><a name="l00745"></a><span class="lineno">  745</span>&#160;            <span class="comment">/*Busco el nodo y actualizo su nivel (si todavía no lo hizo)*/</span></div>
<div class="line"><a name="l00746"></a><span class="lineno">  746</span>&#160;            <a class="code" href="____uthash_8h.html#ad4a1cd39c3044936c0e49d3f372c9dbf">HASH_FIND</a>(hhNet, dova-&gt;net, &amp;yName, <span class="keyword">sizeof</span>(yName), y);</div>
<div class="line"><a name="l00747"></a><span class="lineno">  747</span>&#160;            assert(y != NULL);</div>
<div class="line"><a name="l00748"></a><span class="lineno">  748</span>&#160;            <span class="keywordflow">if</span>(y-&gt;<a class="code" href="structNetwork.html#a6c7f440bf2fb555abdc789a41c6acf44">lvl</a> == <a class="code" href="API_8c.html#a944eff1e60dc7aa1a80a3d74581d59c8">LVL_NIL</a>){</div>
<div class="line"><a name="l00749"></a><span class="lineno">  749</span>&#160;                y-&gt;<a class="code" href="structNetwork.html#a6c7f440bf2fb555abdc789a41c6acf44">lvl</a> = x-&gt;<a class="code" href="structNetwork.html#a6c7f440bf2fb555abdc789a41c6acf44">lvl</a> + 1;</div>
<div class="line"><a name="l00750"></a><span class="lineno">  750</span>&#160;                <a class="code" href="__queue_8c.html#aa4f9f9bfddcb1edb5edce74730fe309b">queue_enqueue</a>(upd, y);</div>
<div class="line"><a name="l00751"></a><span class="lineno">  751</span>&#160;                <span class="keywordflow">if</span>(yName == dova-&gt;snk)  <span class="comment">/*Se llego a t*/</span></div>
<div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160;                    <a class="code" href="API_8c.html#a83b5b7cc41c6290c3c2ae4824ac66cb7">SET_FLAG</a>(<a class="code" href="API_8c.html#ac378f92787011df9178de5ddbfd431e9">SINK_REACHED</a>);</div>
<div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160;            }</div>
<div class="line"><a name="l00754"></a><span class="lineno">  754</span>&#160;        }</div>
<div class="line"><a name="l00755"></a><span class="lineno">  755</span>&#160;        <span class="comment">/*Busco el siguiente vecino*/</span></div>
<div class="line"><a name="l00756"></a><span class="lineno">  756</span>&#160;        <span class="keywordflow">if</span>(dir == <a class="code" href="nbrhd_8h.html#aa02f16883c5ce325e2dbb8c3835aa9a1">FWD</a> &amp;&amp; !<a class="code" href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a>(<a class="code" href="API_8c.html#ac378f92787011df9178de5ddbfd431e9">SINK_REACHED</a>)){</div>
<div class="line"><a name="l00757"></a><span class="lineno">  757</span>&#160;            getNbr = <a class="code" href="nbrhd_8c.html#ad0c3e02751a0077f2bf1f90e4d0384d1">nbrhd_getFwd</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, <a class="code" href="nbrhd_8h.html#a553fc2c3e5597c822f21145286924748">NXT</a>, &amp;yName);</div>
<div class="line"><a name="l00758"></a><span class="lineno">  758</span>&#160;            <span class="keywordflow">if</span>(!getNbr){   <span class="comment">/*Se acabaron los FWD, sigo con los BWD*/</span></div>
<div class="line"><a name="l00759"></a><span class="lineno">  759</span>&#160;                getNbr = <a class="code" href="nbrhd_8c.html#a0563715d3cfbbb59cf3e83ef242283e2">nbrhd_getBwd</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, <a class="code" href="nbrhd_8h.html#acfb785e5d4271a2e7d9023de22c90495">FST</a>, &amp;yName);</div>
<div class="line"><a name="l00760"></a><span class="lineno">  760</span>&#160;                dir = <a class="code" href="nbrhd_8h.html#ababc4097c218c2f90a92b311e09a8e42">BWD</a>;</div>
<div class="line"><a name="l00761"></a><span class="lineno">  761</span>&#160;            }</div>
<div class="line"><a name="l00762"></a><span class="lineno">  762</span>&#160;        }<span class="keywordflow">else</span> <span class="keywordflow">if</span>(dir == <a class="code" href="nbrhd_8h.html#ababc4097c218c2f90a92b311e09a8e42">BWD</a> &amp;&amp; !<a class="code" href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a>(<a class="code" href="API_8c.html#ac378f92787011df9178de5ddbfd431e9">SINK_REACHED</a>))</div>
<div class="line"><a name="l00763"></a><span class="lineno">  763</span>&#160;            getNbr = <a class="code" href="nbrhd_8c.html#a0563715d3cfbbb59cf3e83ef242283e2">nbrhd_getBwd</a>(x-&gt;<a class="code" href="structNetwork.html#afd53be0446045fad0bd6682824f39336">nbrs</a>, <a class="code" href="nbrhd_8h.html#a553fc2c3e5597c822f21145286924748">NXT</a>, &amp;yName);</div>
<div class="line"><a name="l00764"></a><span class="lineno">  764</span>&#160;    }</div>
<div class="line"><a name="l00765"></a><span class="lineno">  765</span>&#160;}</div>
<div class="ttc" id="API_8c_html_afc3d0c71276442be2f1c53d5a72dd13e"><div class="ttname"><a href="API_8c.html#afc3d0c71276442be2f1c53d5a72dd13e">DestruirDovahkiin</a></div><div class="ttdeci">int DestruirDovahkiin(DovahkiinP dova)</div><div class="ttdoc">Destructor de un DovahkiinP. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00112">API.c:112</a></div></div>
<div class="ttc" id="__queue_8c_html_ac713676fd6b09455383d4f6276ce1d8d"><div class="ttname"><a href="__queue_8c.html#ac713676fd6b09455383d4f6276ce1d8d">queue_swap</a></div><div class="ttdeci">void queue_swap(Queue *Q1, Queue *Q2)</div><div class="ttdoc">Permutación entre las colas. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00172">_queue.c:172</a></div></div>
<div class="ttc" id="__queue_8c_html_aa4f9f9bfddcb1edb5edce74730fe309b"><div class="ttname"><a href="__queue_8c.html#aa4f9f9bfddcb1edb5edce74730fe309b">queue_enqueue</a></div><div class="ttdeci">int queue_enqueue(Queue Q, void *q)</div><div class="ttdoc">Agrega un elemento del tipo Alpha al final de la cola. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00049">_queue.c:49</a></div></div>
<div class="ttc" id="__stack_8c_html_ac271ba7c9291dd690642ee6a28faf2de"><div class="ttname"><a href="__stack_8c.html#ac271ba7c9291dd690642ee6a28faf2de">stack_top</a></div><div class="ttdeci">void * stack_top(Stack S)</div><div class="ttdoc">Muestra el elemento superior de la pila. </div><div class="ttdef"><b>Definition:</b> <a href="__stack_8c_source.html#l00143">_stack.c:143</a></div></div>
<div class="ttc" id="__queue_8c_html_aa3ba377a4b21e817c50a4e52607cb94a"><div class="ttname"><a href="__queue_8c.html#aa3ba377a4b21e817c50a4e52607cb94a">queue_destroy</a></div><div class="ttdeci">int queue_destroy(Queue Q, void **garbage)</div><div class="ttdoc">Destruye y libera la memoria de la cola Q preservando los elementos. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00131">_queue.c:131</a></div></div>
<div class="ttc" id="__queue_8c_html_ae9892369297db38bc1b7955a310f8c30"><div class="ttname"><a href="__queue_8c.html#ae9892369297db38bc1b7955a310f8c30">queue_isEmpty</a></div><div class="ttdeci">int queue_isEmpty(Queue Q)</div><div class="ttdoc">Verifica que la cola este vacía. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00114">_queue.c:114</a></div></div>
<div class="ttc" id="structDovahkiinSt_html_ac8bf36fe0577cba66bccda3a6f7e80a4"><div class="ttname"><a href="structDovahkiinSt.html#ac8bf36fe0577cba66bccda3a6f7e80a4">DovahkiinSt::flags</a></div><div class="ttdeci">int flags</div><div class="ttdoc">Flags de estado, explicados en la sección define. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00074">API.c:74</a></div></div>
<div class="ttc" id="structDovahkiinSt_html_a6e01e80628c38e9f851887a1a6f84129"><div class="ttname"><a href="structDovahkiinSt.html#a6e01e80628c38e9f851887a1a6f84129">DovahkiinSt::src</a></div><div class="ttdeci">u64 src</div><div class="ttdoc">Nodo fijado como fuente (s). </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00069">API.c:69</a></div></div>
<div class="ttc" id="structDovahkiinSt_html_a187ad7ab0fd9b6a049bd07208f873061"><div class="ttname"><a href="structDovahkiinSt.html#a187ad7ab0fd9b6a049bd07208f873061">DovahkiinSt::pCounter</a></div><div class="ttdeci">u64 pCounter</div><div class="ttdoc">Contador para la cantidad de caminos. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00073">API.c:73</a></div></div>
<div class="ttc" id="structNetwork_html_ae7b1690ddd7f2fa9f4d567b20df26d2b"><div class="ttname"><a href="structNetwork.html#ae7b1690ddd7f2fa9f4d567b20df26d2b">Network::hhNet</a></div><div class="ttdeci">UT_hash_handle hhNet</div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00055">API.c:55</a></div></div>
<div class="ttc" id="API_8c_html_af116b369240f80dd16135b9837d99321"><div class="ttname"><a href="API_8c.html#af116b369240f80dd16135b9837d99321">AumentarFlujoYTambienImprimirCamino</a></div><div class="ttdeci">u64 AumentarFlujoYTambienImprimirCamino(DovahkiinP dova)</div><div class="ttdoc">Idem AumentarFlujo() pero también imprime el camino por el Estandar Output. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00475">API.c:475</a></div></div>
<div class="ttc" id="__stack_8h_html"><div class="ttname"><a href="__stack_8h.html">_stack.h</a></div><div class="ttdoc">La librería _stack proporciona una serie de herramientas para almacenar cualquier tipo de elemento en...</div></div>
<div class="ttc" id="nbrhd_8c_html_ad0c3e02751a0077f2bf1f90e4d0384d1"><div class="ttname"><a href="nbrhd_8c.html#ad0c3e02751a0077f2bf1f90e4d0384d1">nbrhd_getFwd</a></div><div class="ttdeci">int nbrhd_getFwd(Nbrhd nbrs, int rqst, u64 *y)</div><div class="ttdoc">Busca el siguiente vecino forward. </div><div class="ttdef"><b>Definition:</b> <a href="nbrhd_8c_source.html#l00128">nbrhd.c:128</a></div></div>
<div class="ttc" id="API_8c_html_a24a677d77df565a3976f7ea6373a9c9d"><div class="ttname"><a href="API_8c.html#a24a677d77df565a3976f7ea6373a9c9d">ImprimirFuente</a></div><div class="ttdeci">int ImprimirFuente(DovahkiinP dova)</div><div class="ttdoc">Imprime por la salida estándar el nombre del nodo que es fuente. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00168">API.c:168</a></div></div>
<div class="ttc" id="structDovahkiinSt_html_a580f8a8c4ebfa45c9301356ee21896de"><div class="ttname"><a href="structDovahkiinSt.html#a580f8a8c4ebfa45c9301356ee21896de">DovahkiinSt::snk</a></div><div class="ttdeci">u64 snk</div><div class="ttdoc">Nodo fijado como resumidero (t). </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00070">API.c:70</a></div></div>
<div class="ttc" id="____uthash_8h_html_a3f83117e1108d63844a58d2d79c3b980"><div class="ttname"><a href="____uthash_8h.html#a3f83117e1108d63844a58d2d79c3b980">HASH_DELETE</a></div><div class="ttdeci">#define HASH_DELETE(hh, head, delptr)</div><div class="ttdef"><b>Definition:</b> <a href="____uthash_8h_source.html#l00222">__uthash.h:222</a></div></div>
<div class="ttc" id="API_8c_html_ac103b05e521b20c12abb4320deccaa25"><div class="ttname"><a href="API_8c.html#ac103b05e521b20c12abb4320deccaa25">DIR_NIL</a></div><div class="ttdeci">#define DIR_NIL</div><div class="ttdoc">Valor nulo de dirección en el path para los nodos. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00016">API.c:16</a></div></div>
<div class="ttc" id="parser__lado_8h_html"><div class="ttname"><a href="parser__lado_8h.html">parser_lado.h</a></div><div class="ttdoc">Parseador de lados desde la entrada Estandar Input. </div></div>
<div class="ttc" id="__stack_8c_html_adbe0fc6f4fbbfd3266b7ebeadd413cd3"><div class="ttname"><a href="__stack_8c.html#adbe0fc6f4fbbfd3266b7ebeadd413cd3">stack_create</a></div><div class="ttdeci">Stack stack_create(void)</div><div class="ttdoc">Crea una pila vacía. </div><div class="ttdef"><b>Definition:</b> <a href="__stack_8c_source.html#l00031">_stack.c:31</a></div></div>
<div class="ttc" id="structNetwork_html_aa951a7b2858ea82e9e873cb8b9b6a055"><div class="ttname"><a href="structNetwork.html#aa951a7b2858ea82e9e873cb8b9b6a055">Network::pDir</a></div><div class="ttdeci">short int pDir</div><div class="ttdoc">Dirección con su ancestro en el path. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00054">API.c:54</a></div></div>
<div class="ttc" id="API_8c_html_a9db4153fec89607db0b7bb7fe9cda7d1"><div class="ttname"><a href="API_8c.html#a9db4153fec89607db0b7bb7fe9cda7d1">UNSET_FLAG</a></div><div class="ttdeci">#define UNSET_FLAG(f)</div><div class="ttdoc">Desactiva(0) el bit de la flag f. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00029">API.c:29</a></div></div>
<div class="ttc" id="nbrhd_8c_html_afc04eb8a4ab84cddef449ba3f698f6d8"><div class="ttname"><a href="nbrhd_8c.html#afc04eb8a4ab84cddef449ba3f698f6d8">nbrhd_getFlow</a></div><div class="ttdeci">u64 nbrhd_getFlow(Nbrhd nbrs, u64 y, short int dir)</div><div class="ttdoc">Devuelve el valor del flujo del lado que relaciona al nodo ancestro &#39;x&#39; con el vecino &#39;y&#39;...</div><div class="ttdef"><b>Definition:</b> <a href="nbrhd_8c_source.html#l00265">nbrhd.c:265</a></div></div>
<div class="ttc" id="nbrhd_8h_html_a553fc2c3e5597c822f21145286924748"><div class="ttname"><a href="nbrhd_8h.html#a553fc2c3e5597c822f21145286924748">NXT</a></div><div class="ttdeci">#define NXT</div><div class="ttdoc">El siguiente del último consultado. </div><div class="ttdef"><b>Definition:</b> <a href="nbrhd_8h_source.html#l00051">nbrhd.h:51</a></div></div>
<div class="ttc" id="structNetwork_html_a6c7f440bf2fb555abdc789a41c6acf44"><div class="ttname"><a href="structNetwork.html#a6c7f440bf2fb555abdc789a41c6acf44">Network::lvl</a></div><div class="ttdeci">int lvl</div><div class="ttdoc">Nivel de distancia del nodo. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00053">API.c:53</a></div></div>
<div class="ttc" id="structDovahkiinSt_html"><div class="ttname"><a href="structDovahkiinSt.html">DovahkiinSt</a></div><div class="ttdoc">Estructura de un Dovahkiin con los datos que se necesitan almacenar para ejecutar Dinic...</div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00066">API.c:66</a></div></div>
<div class="ttc" id="API_8c_html_a297e3676e6f1a95aa659bad307e143b0"><div class="ttname"><a href="API_8c.html#a297e3676e6f1a95aa659bad307e143b0">network_destroy</a></div><div class="ttdeci">static void network_destroy(Network *net)</div><div class="ttdoc">Destructor de un Network. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00654">API.c:654</a></div></div>
<div class="ttc" id="structNetwork_html_ad1d9cbcfd37b9b413e8d8d67a719d165"><div class="ttname"><a href="structNetwork.html#ad1d9cbcfd37b9b413e8d8d67a719d165">Network::name</a></div><div class="ttdeci">u64 name</div><div class="ttdoc">Hash key - nombre del nodo. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00051">API.c:51</a></div></div>
<div class="ttc" id="nbrhd_8h_html_ababc4097c218c2f90a92b311e09a8e42"><div class="ttname"><a href="nbrhd_8h.html#ababc4097c218c2f90a92b311e09a8e42">BWD</a></div><div class="ttdeci">#define BWD</div><div class="ttdoc">Backward. </div><div class="ttdef"><b>Definition:</b> <a href="nbrhd_8h_source.html#l00046">nbrhd.h:46</a></div></div>
<div class="ttc" id="__lexer_8c_html_aab02b4d1aa9740ac7a34420b4b9bbd6d"><div class="ttname"><a href="__lexer_8c.html#aab02b4d1aa9740ac7a34420b4b9bbd6d">lexer_new</a></div><div class="ttdeci">Lexer * lexer_new(FILE *f)</div><div class="ttdef"><b>Definition:</b> <a href="__lexer_8c_source.html#l00061">_lexer.c:61</a></div></div>
<div class="ttc" id="__queue_8c_html_a1f8653e2322de90458051e3061af90ce"><div class="ttname"><a href="__queue_8c.html#a1f8653e2322de90458051e3061af90ce">queue_dequeue</a></div><div class="ttdeci">void * queue_dequeue(Queue Q)</div><div class="ttdoc">Quita el ultimo elemento de la cola. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00075">_queue.c:75</a></div></div>
<div class="ttc" id="structDovahkiinSt_html_a94d792c1c34d1a54b1332660f9722c9b"><div class="ttname"><a href="structDovahkiinSt.html#a94d792c1c34d1a54b1332660f9722c9b">DovahkiinSt::flow</a></div><div class="ttdeci">u64 flow</div><div class="ttdoc">Valor del flujo del dova. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00068">API.c:68</a></div></div>
<div class="ttc" id="__stack_8c_html_ab0aed143ba08a11614cf428f26330750"><div class="ttname"><a href="__stack_8c.html#ab0aed143ba08a11614cf428f26330750">stack_push</a></div><div class="ttdeci">int stack_push(Stack S, void *elem)</div><div class="ttdoc">Agrega un elemento del tipo Alpha a la parte superior de la pila. </div><div class="ttdef"><b>Definition:</b> <a href="__stack_8c_source.html#l00090">_stack.c:90</a></div></div>
<div class="ttc" id="____uthash_8h_html_aaf01358e257c8d838eb5e4b189f0c399"><div class="ttname"><a href="____uthash_8h.html#aaf01358e257c8d838eb5e4b189f0c399">HASH_ADD</a></div><div class="ttdeci">#define HASH_ADD(hh, head, fieldname, keylen_in, add)</div><div class="ttdef"><b>Definition:</b> <a href="____uthash_8h_source.html#l00167">__uthash.h:167</a></div></div>
<div class="ttc" id="API_8c_html_a16260bb6534d66a4e14ddd6b68ea151d"><div class="ttname"><a href="API_8c.html#a16260bb6534d66a4e14ddd6b68ea151d">FijarResumidero</a></div><div class="ttdeci">void FijarResumidero(DovahkiinP dova, u64 t)</div><div class="ttdoc">Establece un nodo como resumidero del network. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00152">API.c:152</a></div></div>
<div class="ttc" id="__u64_8h_html_a645f984d9f5a6deb677738f67938df32"><div class="ttname"><a href="__u64_8h.html#a645f984d9f5a6deb677738f67938df32">u64_min</a></div><div class="ttdeci">#define u64_min(a, b)</div><div class="ttdoc">Retorna el minimo entre 2 números u64. </div><div class="ttdef"><b>Definition:</b> <a href="__u64_8h_source.html#l00031">_u64.h:31</a></div></div>
<div class="ttc" id="structUT__hash__handle_html"><div class="ttname"><a href="structUT__hash__handle.html">UT_hash_handle</a></div><div class="ttdef"><b>Definition:</b> <a href="____uthash_8h_source.html#l00944">__uthash.h:944</a></div></div>
<div class="ttc" id="__stack_8c_html_aceecd8ac8ccae30bcca91b877843e434"><div class="ttname"><a href="__stack_8c.html#aceecd8ac8ccae30bcca91b877843e434">stack_isEmpty</a></div><div class="ttdeci">int stack_isEmpty(Stack S)</div><div class="ttdoc">Verifica que la pila este vacía. </div><div class="ttdef"><b>Definition:</b> <a href="__stack_8c_source.html#l00133">_stack.c:133</a></div></div>
<div class="ttc" id="nbrhd_8c_html_a006b65686eb0a5b9866d5c820e080c36"><div class="ttname"><a href="nbrhd_8c.html#a006b65686eb0a5b9866d5c820e080c36">nbrhd_create</a></div><div class="ttdeci">Nbrhd nbrhd_create(void)</div><div class="ttdoc">Constructor de un nuevo Nbrhd. </div><div class="ttdef"><b>Definition:</b> <a href="nbrhd_8c_source.html#l00053">nbrhd.c:53</a></div></div>
<div class="ttc" id="API_8c_html_a83b5b7cc41c6290c3c2ae4824ac66cb7"><div class="ttname"><a href="API_8c.html#a83b5b7cc41c6290c3c2ae4824ac66cb7">SET_FLAG</a></div><div class="ttdeci">#define SET_FLAG(f)</div><div class="ttdoc">Activa(1) el bit de la flag f. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00028">API.c:28</a></div></div>
<div class="ttc" id="__u64_8h_html_a330e2eeecd2ebf590a4bc942f1d9c1cf"><div class="ttname"><a href="__u64_8h.html#a330e2eeecd2ebf590a4bc942f1d9c1cf">u64_MAX</a></div><div class="ttdeci">#define u64_MAX</div><div class="ttdoc">Máximo valor posible para u64. </div><div class="ttdef"><b>Definition:</b> <a href="__u64_8h_source.html#l00025">_u64.h:25</a></div></div>
<div class="ttc" id="__queue_8c_html_a24a786275016ae7b4831f94fa44dd6a8"><div class="ttname"><a href="__queue_8c.html#a24a786275016ae7b4831f94fa44dd6a8">queue_create</a></div><div class="ttdeci">Queue queue_create(void)</div><div class="ttdoc">Crea una cola sin elementos. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00030">_queue.c:30</a></div></div>
<div class="ttc" id="____uthash_8h_html_a4d524042f1fcb976d8bccae9e4cc63d6"><div class="ttname"><a href="____uthash_8h.html#a4d524042f1fcb976d8bccae9e4cc63d6">HASH_ITER</a></div><div class="ttdeci">#define HASH_ITER(hh, head, el, tmp)</div><div class="ttdef"><b>Definition:</b> <a href="____uthash_8h_source.html#l00878">__uthash.h:878</a></div></div>
<div class="ttc" id="lado_8c_html_ac67229f7a5f55dd9d2c0dd8caea42c27"><div class="ttname"><a href="lado_8c.html#ac67229f7a5f55dd9d2c0dd8caea42c27">lado_getY</a></div><div class="ttdeci">u64 lado_getY(Lado edge)</div><div class="ttdoc">Obtener el nombre del nodo &#39;y&#39;. </div><div class="ttdef"><b>Definition:</b> <a href="lado_8c_source.html#l00061">lado.c:61</a></div></div>
<div class="ttc" id="parser__lado_8c_html_ab7926b7db6f62e0136312eb5c39a726a"><div class="ttname"><a href="parser__lado_8c.html#ab7926b7db6f62e0136312eb5c39a726a">parser_nextLine</a></div><div class="ttdeci">int parser_nextLine(Lexer *input)</div><div class="ttdoc">Consume el fin de línea. </div><div class="ttdef"><b>Definition:</b> <a href="parser__lado_8c_source.html#l00062">parser_lado.c:62</a></div></div>
<div class="ttc" id="API_8c_html_ae1a969d3ef7d23e93db04f15cc6f7588"><div class="ttname"><a href="API_8c.html#ae1a969d3ef7d23e93db04f15cc6f7588">NuevoDovahkiin</a></div><div class="ttdeci">DovahkiinP NuevoDovahkiin(void)</div><div class="ttdoc">Creador de un nuevo DovahkiinP. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00088">API.c:88</a></div></div>
<div class="ttc" id="lado_8c_html_a701f41b841de7dd1527696515ed67bde"><div class="ttname"><a href="lado_8c.html#a701f41b841de7dd1527696515ed67bde">lado_destroy</a></div><div class="ttdeci">void lado_destroy(Lado edge)</div><div class="ttdoc">Destructor de un lado. </div><div class="ttdef"><b>Definition:</b> <a href="lado_8c_source.html#l00037">lado.c:37</a></div></div>
<div class="ttc" id="____uthash_8h_html"><div class="ttname"><a href="____uthash_8h.html">__uthash.h</a></div><div class="ttdoc">A Hash in C. </div></div>
<div class="ttc" id="API_8c_html_abb9984ff33110d421bbb4eead3292bb0"><div class="ttname"><a href="API_8c.html#abb9984ff33110d421bbb4eead3292bb0">PATHUSED</a></div><div class="ttdeci">#define PATHUSED</div><div class="ttdoc">Camino usado para aumentar flujo. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00025">API.c:25</a></div></div>
<div class="ttc" id="API_8c_html_ae65b8790af6d660290a77b9d84ec9897"><div class="ttname"><a href="API_8c.html#ae65b8790af6d660290a77b9d84ec9897">CargarUnLado</a></div><div class="ttdeci">int CargarUnLado(DovahkiinP dova, Lado edge)</div><div class="ttdoc">Carga un lado no nulo en un DovahkiinP. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00247">API.c:247</a></div></div>
<div class="ttc" id="__queue_8h_html"><div class="ttname"><a href="__queue_8h.html">_queue.h</a></div><div class="ttdoc">La librería _queue proporciona una serie de herramientas para almacenar cualquier tipo de elemento en...</div></div>
<div class="ttc" id="API_8c_html_adb1aacb84dbc34f3a142a9d7bc80f375"><div class="ttname"><a href="API_8c.html#adb1aacb84dbc34f3a142a9d7bc80f375">SINK</a></div><div class="ttdeci">#define SINK</div><div class="ttdoc">Resumidero fijado. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00024">API.c:24</a></div></div>
<div class="ttc" id="__lexer_8c_html_a12aff8e140d703e68362dc301a3ade01"><div class="ttname"><a href="__lexer_8c.html#a12aff8e140d703e68362dc301a3ade01">lexer_destroy</a></div><div class="ttdeci">void lexer_destroy(Lexer *self)</div><div class="ttdef"><b>Definition:</b> <a href="__lexer_8c_source.html#l00081">_lexer.c:81</a></div></div>
<div class="ttc" id="structQueue_html"><div class="ttname"><a href="structQueue.html">Queue</a></div><div class="ttdoc">Puntero a una cola. </div></div>
<div class="ttc" id="API_8c_html_a944eff1e60dc7aa1a80a3d74581d59c8"><div class="ttname"><a href="API_8c.html#a944eff1e60dc7aa1a80a3d74581d59c8">LVL_NIL</a></div><div class="ttdeci">#define LVL_NIL</div><div class="ttdoc">Valor nulo de distancia para los nodos. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00015">API.c:15</a></div></div>
<div class="ttc" id="nbrhd_8c_html_ab32ddc38828b7a18e3dfba02180ce6fa"><div class="ttname"><a href="nbrhd_8c.html#ab32ddc38828b7a18e3dfba02180ce6fa">nbrhd_increaseFlow</a></div><div class="ttdeci">u64 nbrhd_increaseFlow(Nbrhd nbrs, u64 y, short int dir, u64 vf)</div><div class="ttdoc">Se aumenta el flujo para con el vecino &#39;y&#39; por &#39;vf&#39; cantidad. </div><div class="ttdef"><b>Definition:</b> <a href="nbrhd_8c_source.html#l00207">nbrhd.c:207</a></div></div>
<div class="ttc" id="__u64_8h_html_a3f7e2bcbb0b4c338f3c4f6c937cd4234"><div class="ttname"><a href="__u64_8h.html#a3f7e2bcbb0b4c338f3c4f6c937cd4234">u64</a></div><div class="ttdeci">uint64_t u64</div><div class="ttdoc">Entero de 64 bits sin signo. </div><div class="ttdef"><b>Definition:</b> <a href="__u64_8h_source.html#l00017">_u64.h:17</a></div></div>
<div class="ttc" id="____bstrlib_8h_html"><div class="ttname"><a href="____bstrlib_8h.html">__bstrlib.h</a></div><div class="ttdoc">The Better String Library is an abstraction of a string data type which is superior to the C library ...</div></div>
<div class="ttc" id="__queue_8c_html_a211ac9b50a8c7917a328cf68efb1f7e9"><div class="ttname"><a href="__queue_8c.html#a211ac9b50a8c7917a328cf68efb1f7e9">queue_head</a></div><div class="ttdeci">void * queue_head(Queue Q)</div><div class="ttdoc">Muestra la cabeza de la cola. </div><div class="ttdef"><b>Definition:</b> <a href="__queue_8c_source.html#l00099">_queue.c:99</a></div></div>
<div class="ttc" id="parser__lado_8c_html_a333eb635ada6c988a7734f60094844b5"><div class="ttname"><a href="parser__lado_8c.html#a333eb635ada6c988a7734f60094844b5">parser_lado</a></div><div class="ttdeci">Lado parser_lado(Lexer *input)</div><div class="ttdoc">Lee todo un Lado de input hasta llegar a un fin de línea o de archivo. </div><div class="ttdef"><b>Definition:</b> <a href="parser__lado_8c_source.html#l00026">parser_lado.c:26</a></div></div>
<div class="ttc" id="structNbrhd_html"><div class="ttname"><a href="structNbrhd.html">Nbrhd</a></div><div class="ttdoc">Puntero a la vecindad de un nodo. </div></div>
<div class="ttc" id="structNetwork_html"><div class="ttname"><a href="structNetwork.html">Network</a></div><div class="ttdoc">Estructura de un netwrok con la información de los nodos. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00050">API.c:50</a></div></div>
<div class="ttc" id="structUT__hash__handle_html_a75b19ffcca77bfc647ff02695958fd95"><div class="ttname"><a href="structUT__hash__handle.html#a75b19ffcca77bfc647ff02695958fd95">UT_hash_handle::next</a></div><div class="ttdeci">void * next</div><div class="ttdef"><b>Definition:</b> <a href="____uthash_8h_source.html#l00947">__uthash.h:947</a></div></div>
<div class="ttc" id="__lexer_8h_html"><div class="ttname"><a href="__lexer_8h.html">_lexer.h</a></div><div class="ttdoc">Analizador léxico que lee el flujo de caracteres de entrada y lo transforma en una secuencia de compo...</div></div>
<div class="ttc" id="lado_8h_html_a90b033fe9661d1b5a94b418825575f94"><div class="ttname"><a href="lado_8h.html#a90b033fe9661d1b5a94b418825575f94">LadoNulo</a></div><div class="ttdeci">#define LadoNulo</div><div class="ttdoc">Un lado que es nulo. </div><div class="ttdef"><b>Definition:</b> <a href="lado_8h_source.html#l00017">lado.h:17</a></div></div>
<div class="ttc" id="API_8c_html_a7fadfdae8bf188ab9889b75942729359"><div class="ttname"><a href="API_8c.html#a7fadfdae8bf188ab9889b75942729359">AumentarFlujo</a></div><div class="ttdeci">u64 AumentarFlujo(DovahkiinP dova)</div><div class="ttdoc">Aumenta el flujo del network. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00442">API.c:442</a></div></div>
<div class="ttc" id="API_8c_html_a65c95d25866c0cf86e927afdae88de04"><div class="ttname"><a href="API_8c.html#a65c95d25866c0cf86e927afdae88de04">Prepararse</a></div><div class="ttdeci">int Prepararse(DovahkiinP dova)</div><div class="ttdoc">Preprocesa el DovahkiinP para empezar a buscar caminos aumentantes. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00290">API.c:290</a></div></div>
<div class="ttc" id="nbrhd_8c_html_a0563715d3cfbbb59cf3e83ef242283e2"><div class="ttname"><a href="nbrhd_8c.html#a0563715d3cfbbb59cf3e83ef242283e2">nbrhd_getBwd</a></div><div class="ttdeci">int nbrhd_getBwd(Nbrhd nbrs, int rqst, u64 *y)</div><div class="ttdoc">Busca el siguiente vecino backward. </div><div class="ttdef"><b>Definition:</b> <a href="nbrhd_8c_source.html#l00171">nbrhd.c:171</a></div></div>
<div class="ttc" id="API_8c_html_a9026c1ef7ab01411b3c7b03c56a06fee"><div class="ttname"><a href="API_8c.html#a9026c1ef7ab01411b3c7b03c56a06fee">set_lvlNbrs</a></div><div class="ttdeci">static void set_lvlNbrs(DovahkiinP dova, Network *x, Queue q)</div><div class="ttdoc">Actualiza los niveles de distancias de los vecinos forward y luego los backward de un nodo...</div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00725">API.c:725</a></div></div>
<div class="ttc" id="____uthash_8h_html_a0512b3f7a824275579ec82643ef2cc23"><div class="ttname"><a href="____uthash_8h.html#a0512b3f7a824275579ec82643ef2cc23">HASH_CLEAR</a></div><div class="ttdeci">#define HASH_CLEAR(hh, head)</div><div class="ttdef"><b>Definition:</b> <a href="____uthash_8h_source.html#l00856">__uthash.h:856</a></div></div>
<div class="ttc" id="API_8c_html_a061350ba02f3d7830497f165cf345512"><div class="ttname"><a href="API_8c.html#a061350ba02f3d7830497f165cf345512">CLEAR_FLAG</a></div><div class="ttdeci">#define CLEAR_FLAG()</div><div class="ttdoc">Inicializa todas las flags (reset). </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00030">API.c:30</a></div></div>
<div class="ttc" id="API_8c_html_a70536e45ffcb80d6c558b8452c849990"><div class="ttname"><a href="API_8c.html#a70536e45ffcb80d6c558b8452c849990">network_create</a></div><div class="ttdeci">static Network * network_create(u64 n)</div><div class="ttdoc">Creador de un nuevo Network. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00636">API.c:636</a></div></div>
<div class="ttc" id="nbrhd_8h_html_aa02f16883c5ce325e2dbb8c3835aa9a1"><div class="ttname"><a href="nbrhd_8h.html#aa02f16883c5ce325e2dbb8c3835aa9a1">FWD</a></div><div class="ttdeci">#define FWD</div><div class="ttdoc">Forward. </div><div class="ttdef"><b>Definition:</b> <a href="nbrhd_8h_source.html#l00045">nbrhd.h:45</a></div></div>
<div class="ttc" id="__lexer_8c_html_aef5130d55b06d8a9e22a76dab34df192"><div class="ttname"><a href="__lexer_8c.html#aef5130d55b06d8a9e22a76dab34df192">lexer_is_off</a></div><div class="ttdeci">bool lexer_is_off(const Lexer *self)</div><div class="ttdef"><b>Definition:</b> <a href="__lexer_8c_source.html#l00119">_lexer.c:119</a></div></div>
<div class="ttc" id="nbrhd_8c_html_a0dd3e6d98e45f2bbf494d6bba07ffd15"><div class="ttname"><a href="nbrhd_8c.html#a0dd3e6d98e45f2bbf494d6bba07ffd15">nbrhd_getCap</a></div><div class="ttdeci">u64 nbrhd_getCap(Nbrhd nbrs, u64 y, short int dir)</div><div class="ttdoc">Devuelve la capacidad del lado que relaciona al nodo ancestro &#39;x&#39; con el vecino &#39;y&#39;. </div><div class="ttdef"><b>Definition:</b> <a href="nbrhd_8c_source.html#l00242">nbrhd.c:242</a></div></div>
<div class="ttc" id="structLado_html"><div class="ttname"><a href="structLado.html">Lado</a></div><div class="ttdoc">Puntero a un lado. </div></div>
<div class="ttc" id="structDovahkiinP_html"><div class="ttname"><a href="structDovahkiinP.html">DovahkiinP</a></div><div class="ttdoc">Puntero al Dovahkiin. </div></div>
<div class="ttc" id="__stack_8c_html_a72101773b7770f4aef2041f5b0d5e959"><div class="ttname"><a href="__stack_8c.html#a72101773b7770f4aef2041f5b0d5e959">stack_pop</a></div><div class="ttdeci">void * stack_pop(Stack S)</div><div class="ttdoc">Quita el elemento superior de la pila. </div><div class="ttdef"><b>Definition:</b> <a href="__stack_8c_source.html#l00110">_stack.c:110</a></div></div>
<div class="ttc" id="nbrhd_8h_html_acfb785e5d4271a2e7d9023de22c90495"><div class="ttname"><a href="nbrhd_8h.html#acfb785e5d4271a2e7d9023de22c90495">FST</a></div><div class="ttdeci">#define FST</div><div class="ttdoc">El primero. </div><div class="ttdef"><b>Definition:</b> <a href="nbrhd_8h_source.html#l00050">nbrhd.h:50</a></div></div>
<div class="ttc" id="API_8c_html_a04d15e043d28652a2193455bdc751604"><div class="ttname"><a href="API_8c.html#a04d15e043d28652a2193455bdc751604">FijarFuente</a></div><div class="ttdeci">void FijarFuente(DovahkiinP dova, u64 s)</div><div class="ttdoc">Establece un nodo como fuente del network. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00141">API.c:141</a></div></div>
<div class="ttc" id="API_8c_html_a90aefbc8ffa273f827dc6122b7e85466"><div class="ttname"><a href="API_8c.html#a90aefbc8ffa273f827dc6122b7e85466">network_nextNode</a></div><div class="ttdeci">static Network * network_nextNode(Network *net, Network *x, short int *dir)</div><div class="ttdoc">Busca el siguiente nodo que cumple las condiciones de envío de flujo. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00671">API.c:671</a></div></div>
<div class="ttc" id="API_8c_html_a493f4aff33fcec0bda5b03c499de4921"><div class="ttname"><a href="API_8c.html#a493f4aff33fcec0bda5b03c499de4921">get_pathFlow</a></div><div class="ttdeci">static u64 get_pathFlow(DovahkiinP dova)</div><div class="ttdoc">Busca el máximo valor de flujo que se puede enviar por un camino sin usar. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00609">API.c:609</a></div></div>
<div class="ttc" id="API_8c_html_aa5169c5746c8931c31cdeb0c38bf9c1e"><div class="ttname"><a href="API_8c.html#aa5169c5746c8931c31cdeb0c38bf9c1e">ImprimirFlujo</a></div><div class="ttdeci">void ImprimirFlujo(DovahkiinP dova)</div><div class="ttdoc">Imprime por Estandar Output el Flujo hasta el momento. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00511">API.c:511</a></div></div>
<div class="ttc" id="nbrhd_8c_html_adba3ec97b97e982e7f5bfc486e9e22b5"><div class="ttname"><a href="nbrhd_8c.html#adba3ec97b97e982e7f5bfc486e9e22b5">nbrhd_addEdge</a></div><div class="ttdeci">void nbrhd_addEdge(Nbrhd x, Nbrhd y, Lado edge)</div><div class="ttdoc">Genera el vinculo entre &#39;x&#39; e &#39;y&#39; (edge) convirtiéndolos en vecinos. </div><div class="ttdef"><b>Definition:</b> <a href="nbrhd_8c_source.html#l00087">nbrhd.c:87</a></div></div>
<div class="ttc" id="lado_8c_html_aa684fbc52c931f51bd3516e911658b72"><div class="ttname"><a href="lado_8c.html#aa684fbc52c931f51bd3516e911658b72">lado_getX</a></div><div class="ttdeci">u64 lado_getX(Lado edge)</div><div class="ttdoc">Obtener el nombre del nodo &#39;x&#39;. </div><div class="ttdef"><b>Definition:</b> <a href="lado_8c_source.html#l00051">lado.c:51</a></div></div>
<div class="ttc" id="____uthash_8h_html_ad4a1cd39c3044936c0e49d3f372c9dbf"><div class="ttname"><a href="____uthash_8h.html#ad4a1cd39c3044936c0e49d3f372c9dbf">HASH_FIND</a></div><div class="ttdeci">#define HASH_FIND(hh, head, keyptr, keylen, out)</div><div class="ttdef"><b>Definition:</b> <a href="____uthash_8h_source.html#l00101">__uthash.h:101</a></div></div>
<div class="ttc" id="structStack_html"><div class="ttname"><a href="structStack.html">Stack</a></div><div class="ttdoc">Puntero a una pila. </div></div>
<div class="ttc" id="API_8c_html_aa9391cd1d082becf7c6cd3add3020b94"><div class="ttname"><a href="API_8c.html#aa9391cd1d082becf7c6cd3add3020b94">ImprimirCorte</a></div><div class="ttdeci">void ImprimirCorte(DovahkiinP dova)</div><div class="ttdoc">Imprime por Estandar Output un corte minimal y su capacidad. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00567">API.c:567</a></div></div>
<div class="ttc" id="nbrhd_8c_html_a011cf0e134a632ddac08a769e3275f22"><div class="ttname"><a href="nbrhd_8c.html#a011cf0e134a632ddac08a769e3275f22">nbrhd_destroy</a></div><div class="ttdeci">void nbrhd_destroy(Nbrhd nbrs)</div><div class="ttdoc">Destructor de un Nbrhd. </div><div class="ttdef"><b>Definition:</b> <a href="nbrhd_8c_source.html#l00068">nbrhd.c:68</a></div></div>
<div class="ttc" id="API_8c_html_a09eaf8b3175729e94d54c88f96b230da"><div class="ttname"><a href="API_8c.html#a09eaf8b3175729e94d54c88f96b230da">ActualizarDistancias</a></div><div class="ttdeci">int ActualizarDistancias(DovahkiinP dova)</div><div class="ttdoc">Actualiza las distancias haciendo una búsqueda BFS-FF. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00320">API.c:320</a></div></div>
<div class="ttc" id="structNetwork_html_afd53be0446045fad0bd6682824f39336"><div class="ttname"><a href="structNetwork.html#afd53be0446045fad0bd6682824f39336">Network::nbrs</a></div><div class="ttdeci">Nbrhd nbrs</div><div class="ttdoc">Hash value - vecinos del nodo. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00052">API.c:52</a></div></div>
<div class="ttc" id="API_8h_html"><div class="ttname"><a href="API_8h.html">API.h</a></div><div class="ttdoc">Permite cargar un network y calcular su flujo maximal utilizando Dinic. </div></div>
<div class="ttc" id="API_8c_html_adbe7e36132e377beee414598e0544124"><div class="ttname"><a href="API_8c.html#adbe7e36132e377beee414598e0544124">ImprimirResumidero</a></div><div class="ttdeci">int ImprimirResumidero(DovahkiinP dova)</div><div class="ttdoc">Imprime por la salida estándar el nombre del nodo que es resumidero. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00190">API.c:190</a></div></div>
<div class="ttc" id="API_8c_html_a18f90f81fcff3eaa0d54c05f6c1c5315"><div class="ttname"><a href="API_8c.html#a18f90f81fcff3eaa0d54c05f6c1c5315">BusquedaCaminoAumentante</a></div><div class="ttdeci">int BusquedaCaminoAumentante(DovahkiinP dova)</div><div class="ttdoc">Hace una búsqueda DFS-FF de un camino aumentante de menor longitud. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00383">API.c:383</a></div></div>
<div class="ttc" id="API_8c_html_a4e475a7fbb00903addb0ea50b31a323e"><div class="ttname"><a href="API_8c.html#a4e475a7fbb00903addb0ea50b31a323e">ImprimirValorFlujo</a></div><div class="ttdeci">void ImprimirValorFlujo(DovahkiinP dova)</div><div class="ttdoc">Imprime por Estandar Output el valor del Flujo calculado hasta el momento. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00545">API.c:545</a></div></div>
<div class="ttc" id="API_8c_html_a73ce2e5e598ed903df3611b1da1a653d"><div class="ttname"><a href="API_8c.html#a73ce2e5e598ed903df3611b1da1a653d">PATH_ITER</a></div><div class="ttdeci">#define PATH_ITER(path, x, y)</div><div class="ttdoc">Itera sobre los elementos de un path. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00036">API.c:36</a></div></div>
<div class="ttc" id="parser__lado_8h_html_ae4cf8ecab1aab3f86db880a3aa9c9e19"><div class="ttname"><a href="parser__lado_8h.html#ae4cf8ecab1aab3f86db880a3aa9c9e19">PARSER_OK</a></div><div class="ttdeci">#define PARSER_OK</div><div class="ttdoc">Operación exitosa. </div><div class="ttdef"><b>Definition:</b> <a href="parser__lado_8h_source.html#l00018">parser_lado.h:18</a></div></div>
<div class="ttc" id="structDovahkiinSt_html_ae85ca2a2c403330c0a44a6f704681e6d"><div class="ttname"><a href="structDovahkiinSt.html#ae85ca2a2c403330c0a44a6f704681e6d">DovahkiinSt::path</a></div><div class="ttdeci">Stack path</div><div class="ttdoc">Camino de nodos, de s a t. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00072">API.c:72</a></div></div>
<div class="ttc" id="__stack_8c_html_ac21780acf29f6bc27fd404a61b0b2fd8"><div class="ttname"><a href="__stack_8c.html#ac21780acf29f6bc27fd404a61b0b2fd8">stack_destroy</a></div><div class="ttdeci">int stack_destroy(Stack S, void **garbage)</div><div class="ttdoc">Destruye y libera la memoria de la pila S preservando los elementos. </div><div class="ttdef"><b>Definition:</b> <a href="__stack_8c_source.html#l00056">_stack.c:56</a></div></div>
<div class="ttc" id="API_8c_html_a88cabaa30cba6807a1c75eaa7e4c188e"><div class="ttname"><a href="API_8c.html#a88cabaa30cba6807a1c75eaa7e4c188e">SOURCE</a></div><div class="ttdeci">#define SOURCE</div><div class="ttdoc">Fuente fijada. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00023">API.c:23</a></div></div>
<div class="ttc" id="structDovahkiinSt_html_aa808216233d652893e7191b30384b160"><div class="ttname"><a href="structDovahkiinSt.html#aa808216233d652893e7191b30384b160">DovahkiinSt::cut</a></div><div class="ttdeci">Network * cut</div><div class="ttdoc">Corte minimal. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00071">API.c:71</a></div></div>
<div class="ttc" id="API_8c_html_afaf490cad6df617d537e9c215ae50044"><div class="ttname"><a href="API_8c.html#afaf490cad6df617d537e9c215ae50044">IS_SET_FLAG</a></div><div class="ttdeci">#define IS_SET_FLAG(f)</div><div class="ttdoc">¿El bit de la flag f es 1?. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00031">API.c:31</a></div></div>
<div class="ttc" id="nbrhd_8h_html"><div class="ttname"><a href="nbrhd_8h.html">nbrhd.h</a></div><div class="ttdoc">Encabezado de nbrhd.c. </div></div>
<div class="ttc" id="API_8c_html_a84e808ec7691e6cce6b82b12fc4fd8ce"><div class="ttname"><a href="API_8c.html#a84e808ec7691e6cce6b82b12fc4fd8ce">MAXFLOW</a></div><div class="ttdeci">#define MAXFLOW</div><div class="ttdoc">Es flujo maximal. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00020">API.c:20</a></div></div>
<div class="ttc" id="structDovahkiinSt_html_a4b31117247caf337e6cc13c59022d582"><div class="ttname"><a href="structDovahkiinSt.html#a4b31117247caf337e6cc13c59022d582">DovahkiinSt::net</a></div><div class="ttdeci">Network * net</div><div class="ttdoc">Network de los nodos para acceder a las aristas. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00067">API.c:67</a></div></div>
<div class="ttc" id="API_8c_html_a9e15564793011091c7a8760cc8f1a6b5"><div class="ttname"><a href="API_8c.html#a9e15564793011091c7a8760cc8f1a6b5">LeerUnLado</a></div><div class="ttdeci">Lado LeerUnLado(void)</div><div class="ttdoc">Lee un lado desde la entrada estándar. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00211">API.c:211</a></div></div>
<div class="ttc" id="API_8c_html_ac378f92787011df9178de5ddbfd431e9"><div class="ttname"><a href="API_8c.html#ac378f92787011df9178de5ddbfd431e9">SINK_REACHED</a></div><div class="ttdeci">#define SINK_REACHED</div><div class="ttdoc">Se llego a t. </div><div class="ttdef"><b>Definition:</b> <a href="API_8c_source.html#l00019">API.c:19</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_5116870a98769fcb7fa621a6c1aaaf2c.html">apifiles</a></li><li class="navelem"><a class="el" href="API_8c.html">API.c</a></li>
    <li class="footer">Generado el Lunes, 29 de Septiembre de 2014 22:00:00 para Dinic por
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.8 </li>
  </ul>
</div>
</body>
</html>
